报错内容如下:
These dependencies were not found:
swiper/swiper-bundle.css in ./node_modules/cache-loader/dist/cjs.js??ref–13-0!./node_modules/babel-loader/lib!./node_modul es/cache-loader/dist/cjs.js??ref–1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/page-decoration/modelList /seck.vue

在运行lilishop中manager和seller前端项目时,报了这个错误,查看后发现,swiper版本是5.4.5,而vue-awesome-swiper版本是4.1.1,但在这个vue文件中src/views/page-decoration/modelList /seck.vue写的是:

import { Swiper, SwiperSlide, directive } from "vue-awesome-swiper";
 import "swiper/swiper-bundle.css";

对于swiper版本不同写的就也要不一样

// import style (>= Swiper 6.x)
import 'swiper/swiper-bundle.css'

// import style (<= Swiper 5.x)
import 'swiper/css/swiper.css'

修改之后运行成功了。

GitHub 加速计划 / de / Dependencies
40
1
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:3 个月前 )
1997a400 - 4 年前
2f423539 - 4 年前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐