These relative modules were not found: 报错;(六个试错)方案应该有一个可以帮到你

These relative modules were not found: 
 ./App.vue in ./src/dist/main.dev.js 
 ./router in ./src/dist/main.dev.js 
 ./store in ./src/dist/main.dev.js 
 ./styles/index.css in ./src/dist/main.dev.js

我这主要问题是没有 dist 目录,还报错;一个脑壳两个大

我的解决方案;直接代码提交 git仓库后 重建文件夹,重新clone项目安装依赖运行;目前已解决

  • 试过多种方法,可以提供给各位参考
  • 方案零:直接换个目录重新clone项目(热衷于重启解决99%的问题)
  • 方案一
直接删除 node_modules 文件夹重新安装以依赖;

rm -rf node_modules
npm install
  • 方案二
npm i -g npm-check-updates 
npm-check-updates -u
npm install
// 更新所有依赖包为最新版,没效果;注意:如果是 vue2 版本这里会直接更新至 vue3;默认跳过大版本的更新
  • 方案三

I got this error when I messed up the case of the filename. 
When I ran this on a build server running Linux (I use Mac for development) 
it failed because OS X is case-insensitive and Debian is case-sensitive.
// 当我弄错文件名的大小写时,我得到了这个错误。
// 当我在运行 Linux 的构建服务器上运行它时(我使用 Mac 进行开发)
// 它失败是因为 OS X 不区分大小写,而 Debian 是区分大小写的。
  • 方案四
npm install babel-loader
  • 方案五
remove 'import func from './vue-temp/vue-editor-bridge' this statement.
vscode auto will import this statement when enter 'tab' key before declare func
// 删除“ import func from”./vue-temp/vue-Editor-bridge”这个语句。
// Vscode auto 将在声明 func 之前输入‘ tab’键时导入此语句

该问题讨论连接 github 感兴趣可以前往了解互相学习;希望能对你有所帮助

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

星空下的DeppBing

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值