在确定他们的版本都正确的情况下进行运行npm run dev时:还是报错
ERROR Failed to compile with 1 errors
This dependency was not found:
* vue-awesome-swiper/dist/ssr in ./plugins/nuxt-swiper-plugin.js
To install it, you can run: npm install --save vue-awesome-swiper/dist/ssr
然后就查看了plugins/nuxt-swiper-plugin.js 的配置,依赖是写的vue-awesome-swiper/dist/ssr,根据这个目录去找,发现没有,问题就在这里。
但是不知道他到底要与引用那个js文件,就自己一个一个试,试了好几个之后,发现将plugins/nuxt-swiper-plugin.js里面的import VueAwesomeSwiper from ‘vue-awesome-swiper/dist/ssr'替换成import VueAwesomeSwiper from 'vue-awesome-swiper/dist/exporter'
就不报错了