报错1:Cannot find module '@vue/cli-plugin-babel'
解决方案:当前电脑nodejs版本过高,项目的配置太低,不匹配,如下package.json
{
"dependencies": {
"node-sass": "^4.13.1",
"sass-loader": "^7.3.1",
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.15",
},
}
删除以上几个,重新运行
npm install node-sass
npm install sass-loader
npm install @vue/cli-plugin-babel
报错2: Cannot find module 'chokidar'
解决方案:运行 npm i chokidar --save自动安装当前版本适配
报错3:Cannot find module 'body-parser'
解决方案:运行 npm install --save body-parser
报错4: Cannot find module 'mockjs'
解决方案: npm install mockjs
报错5:Cannot read properties of undefined (reading 'version')
解决方案:npm install eslint