npm install node-gyp 和 leveldown 库的问题
在 npm install 期间,我首先收到此错误:
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/MAMP/htdocs/patagon-clients/node_modules/leveldown
gyp ERR! node -v v12.22.9
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
之后,我收到另一条错误消息(之后 npm install 中断):
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vlado/.npm/_logs/2022-02-28T09_38_25_847Z-debug.log
相关日志大约有 15K 行,因此我不会将其粘贴到此处。您知道可能出现什么问题以及如何解决它吗?
During npm install I get this error first:
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/MAMP/htdocs/patagon-clients/node_modules/leveldown
gyp ERR! node -v v12.22.9
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
After that I get another error message (after which the npm install breaks):
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vlado/.npm/_logs/2022-02-28T09_38_25_847Z-debug.log
The log in question has around 15K lines, so I will not paste it here. Do you know what might be the problem and how to solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过安装一些 nrwl 库解决了这个问题,然后将 package.json 中的 pouchdb 升级到版本
^7.2.2
。没有完全解决 npm 安装问题,但 Angular 服务器现在可以工作了。I solved it by installing some nrwl library and after that, upgraded pouchdb to version
^7.2.2
in the package.json. Didn't solve the npm install completely, but angular server now works.