讲github上的某前端项目下载下来,进行npm install时报错,
根据错误提示,
Fix the upstream dependency conflict, or retry this command with --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
可以判断是less-loader的版本问题
解决方案:
- 根据报错中提示的,在命令后加上–legacy-peer-deps 或者 --force
- 将项目中的package.json文件中的less依赖改为报错提示中的版本:“less”: “^4.0.0”,