简体   繁体   中英

node-gyp rebuild build error 'make' failed npm install

Getting these errors using npm install on OSX 10.10.5:

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上运行更新,神奇的是,一切都会再次起作用。

Unfortunately for me, installing Xcode 7 didn't fix it. I had to downgrade from node 4.2 to 0.12.7. At this point in time, Mean.js only supports Node 0.10.x. (Note that Node jumps from 0.12.7 to 4.0.)

I use n to manage Node versions. To install n

$ npm install -g n 

Then install Node 0.12.7 via n

$ n 0.12.7 

Enter n in the terminal to choose Node version.

$ n

Use arrow to select a version and press enter.

在此处输入图片说明

Then try

$ yo meanjs

This SO post explains in detail on how to change to an older version of node.js.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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