vue项目npm run build报错Error: Cannot find module ‘@vue/cli-plugin-babel‘的解决方法
vue项目npm run build报错Error: Cannot find module '@vue/cli-plugin-babel'的解决方法
·
报错内容
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '@vue/cli-plugin-babel'
Require stack:
- C:\Users\Admin\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js
- C:\Users\Admin\AppData\Roaming\npm\node_modules\@vue\cli-service\bin\vue-cli-service.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at idToPlugin (C:\Users\Admin\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js:172:14)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js:211:20
at Array.map (<anonymous>)
requireStack: [
'C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli-service\\lib\\Service.js',
'C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\@vue\\cli-service\\bin\\vue-cli-service.js'
]
}
解决方法
删除 package-lock.json 然后终端运行 npm install
更多推荐
已为社区贡献1条内容
所有评论(0)