前端

npm does not support Node.js v15.9.0

cnpm run serve

npm does not support Node.js v15.9.0

You should probably upgrade to a newer version of node as we

can't make any promises that npm will work with this version.

You can find the latest version at https://nodejs.org/

 

> vue-antd-jeecg@2.2.1 serve

> vue-cli-service serve

 

INFO Starting development server...

ERROR Error: Cannot find module 'vue-loader/lib/plugin'

Require stack:

- /Users/wangyuqiang/mijiait/txsh/代码/前端/business-AQMS/node_modules/@vue/cli-service/lib/config/base.js

- /Users/wangyuqiang/mijiait/txsh/代码/前端/business-AQMS/node_modules/@vue/cli-service/lib/Service.js

- /Users/wangyuqiang/mijiait/txsh/代码/前端/business-AQMS/node_modules/@vue/cli-service/bin/vue-cli-service.js

Error: Cannot find module 'vue-loader/lib/plugin'

解决方法

注意:下述命令如果提示没有权或是运行在mac,请在命令的前边加上sudo
1.第一步清楚node缓存
npm cache clean -f
2.第二步:安装n模块(n模块是管理nodejs的版本的)
npm install -g n
3.第三步:升级node.js到最新稳定版:
n stable
4. 查看node版本(node -v) /查看node安装路径 (which node)


原文链接:https://blog.csdn.net/weixin_43650973/article/details/124714007