繁体   English   中英

node-gyp重建构建错误“ make”,npm安装失败

[英]node-gyp rebuild build error 'make' failed npm install

在OSX 10.10.5上使用npm install获取这些错误:

build error
gyp ERR! stack Error: `make` failed with exit code: 69
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/4.1.1/bin/node" "/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /node_modules/fsevents
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing fsevents@0.3.8

这将通过安装Xcode 7来解决。只需在Xcode上运行更新,神奇的是,一切都会再次起作用。

对我来说不幸的是,安装Xcode 7并没有解决它。 我不得不从节点4.2降级到0.12.7。 目前,Mean.js仅支持Node0.10.x。 (请注意,Node从0.12.7跳到4.0。)

我使用n来管理Node版本。 要安装ñ

$ npm install -g n 

然后通过n安装Node 0.12.7

$ n 0.12.7 

在终端中输入n以选择“节点版本”。

$ n

使用箭头选择版本,然后按Enter。

在此处输入图片说明

然后尝试

$ yo meanjs

这篇SO帖子详细说明了如何更改为旧版本的node.js。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM