nuxt的页面中 使用swiper幻灯片插件报错

报错

Could not compile template D:\\VSCodeWork\\qiyun\\qiyun-front\\node_modules\\@nuxt\\vue-app\\template\\App.js: Cannot resolve "swiper/dist/css/swiper.css" 
from "D:\VSCodeWork\qiyun\qiyun-front\swiper\dist\css\swiper.css"

解决办法

找到 package.json ,把"vue-awesome-swiper": "^4.1.1" ,版本修改为^3.1.3 版本即可,然后在 重新执行命令 npm install, 

还是不行的话,先执行命令npm cache clean --force ,在执行 npm install 

猜你喜欢

转载自blog.csdn.net/qq_39564710/article/details/113623439