[英]Unable to add firebase to react app with "npm install firebase"
[英]Unable to NPM install/start on an angular project
我已经有这个问题好几个星期了。 从存储库克隆后,我无法安装/启动此项目。
当我使用“npm start”
Could not find module "@angular-devkit/build-angular" from ...
当我使用“npm i”时
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: karma-jasmine-html-reporter@1.5.4
npm ERR! Found: jasmine-core@3.3.0
npm ERR! node_modules/jasmine-core
npm ERR! dev jasmine-core@"~3.3.0" from the root project
npm ERR! jasmine-core@"^3.3" from karma-jasmine@2.0.1
npm ERR! node_modules/karma-jasmine
npm ERR! dev karma-jasmine@"~2.0.1" from the root project
npm ERR! peer karma-jasmine@">=1.1" from karma-jasmine-html-reporter@1.5.4
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter@"^1.5.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jasmine-core@">=3.5" from karma-jasmine-html-reporter@1.5.4
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter@"^1.5.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: jasmine-core@4.3.0
npm ERR! node_modules/jasmine-core
npm ERR! peer jasmine-core@">=3.5" from karma-jasmine-html-reporter@1.5.4
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter@"^1.5.4" from the root project
当我使用“npm i --legacy-peer-deps”时
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! node-pre-gyp ERR! node -v v16.13.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.13.0
npm ERR! node-pre-gyp ERR! not ok
我做了什么
过去几天我在尝试使用具有太新版本的 npm 的节点安装 npm 时遇到了同样的问题(角度 14,节点 14.16/16.13/18.7,ZBB30E85411B45DF412986726) 尝试使用降级 npm 版本
npm install -g npm@version
我使用 npm@8.5.0 并且它有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.