刚从git上面拉下来的代码,我需要跑起来 代码拿到vscoed 命令行输入 npm install 后报错
运行 npm install 报错如下
npm ERR! code ERESOLVE
npm ERR!
npm ERR! While resolving: relytosoft.lms@1.0.0
npm ERR! Found: html-webpack-plugin@4.0.0-alpha
npm ERR! node_modules/html-webpack-plugin
npm ERR! dev html-webpack-plugin@"4.0.0-alpha" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! node_modules/script-ext-html-webpack-plugin
npm ERR! dev script-ext-html-webpack-plugin@"2.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR!
npm ERR! See F:\Program\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! F:\Program_logs\2022-08-30T08_07_46_509Z-debug-0.log
运行 npm install 报错如下
npm ERR! code ERESOLVE
npm ERR!
npm ERR! While resolving: relytosoft.lms@1.0.0
npm ERR! Found: html-webpack-plugin@4.0.0-alpha
npm ERR! node_modules/html-webpack-plugin
npm ERR! dev html-webpack-plugin@"4.0.0-alpha" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! node_modules/script-ext-html-webpack-plugin
npm ERR! dev script-ext-html-webpack-plugin@"2.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR!
npm ERR! See F:\Program\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! F:\Program_logs\2022-08-30T08_07_46_509Z-debug-0.log
按照你的方法 npm install -g cnpm --registry=http://registry.npm.taobao.org/
安装完之后可以通过cnpm -v 检验后报错 (红色的)
cnpm : 无法将“cnpm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
你试试下面的方法:
npm install --registry=https://registry.npmmirror.com
这种问题, 切换一个node看看 package-lock 里面的node版本,然后在新目录, npm install
最简单粗暴的方法 就是把别人的代码copy过来 什么都省了