报错内容

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

Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐