【问题标题】:node-gyp rebuild build error 'make' failed npm installnode-gyp 重建构建错误'make'失败 npm 安装
【发布时间】:2015-12-23 20:17:39
【问题描述】:

在 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

【问题讨论】:

    标签: node.js macos gruntjs npm


    【解决方案1】:

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

    【讨论】:

    • 我遇到了同样的问题,通过接受 Xcode 的条款和协议解决了。
    【解决方案2】:

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

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

    $ npm install -g n 
    

    然后通过 n

    安装 Node 0.12.7
    $ n 0.12.7 
    

    在终端输入n选择Node版本。

    $ n
    

    使用箭头选择版本并按 Enter。

    那就试试

    $ yo meanjs
    

    这篇 SO 帖子详细解释了 how to change to an older version of node.js.

    【讨论】:

    • 更改为 0.12.7 也是唯一对我有用的方法。
    猜你喜欢
    • 1970-01-01
    • 2023-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多