Swiper中文论坛

标题: import {} from 'swiper' 说没有类型声明文件,但实际上是有的 [打印本页]

作者: Martial    时间: 2023-5-24 17:05
标题: import {} from 'swiper' 说没有类型声明文件,但实际上是有的
无法找到模块“swiper”的声明文件。“c:/Users/Administrator/Desktop/cs1/node_modules/swiper/swiper.esm.js”隐式拥有 "any" 类型。
  There are types at 'c:/Users/Administrator/Desktop/cs1/node_modules/swiper/swiper.d.ts', but this result could not be resolved when respecting package.json "exports". The 'swiper' library may need to update its package.json or typings.
ts(7016)


点击 swiper 进去也进入的不是.d.ts文件 而是swiper.esm.js文件


请问一下这种问题怎么解决





欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/) Powered by Discuz! X3.2