Node_modules 文件夹现在已被删除,我想安装它,但没有安装,如果我使用缓存清理命令,那么
npm install
仍然没有在下面创建节点模块文件夹是错误。
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/compiler
npm ERR! @angular/compiler@"~12.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@"12.2.17" from @angular/[email protected]
npm ERR! node_modules/@angular/compiler-cli
npm ERR! dev @angular/compiler-cli@"^12.0.4" 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! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\Shree\AppData\Local\npm-cache\_logs\2024-01-18T07_48_59_835Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: C:\Users\Shree\AppData\Local\npm-cache\_logs\2024-01-18T07_48_59_835Z-debug-0.log
我尝试过像
npm install
然后 npm cache clean
和再次 npm install
这样的命令。
您似乎存在依赖冲突。 您可以使用:
npm i --force
无论如何都要安装它,然后解决冲突。