ember.js 无法在Mac OS X上安装ember-cli

wbrvyc0a  于 2022-11-05  发布在  Mac
关注(0)|答案(2)|浏览(152)

当我尝试通过npm安装ember-cli时,按照官方文档,我得到这个错误:

9 errors generated.
make:***[Release/obj.target/bufferutil/src/bufferutil.o] Error 1
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: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/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/ember-cli/node_modules/bufferutil
gyp ERR! node -v v4.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ember-cli"
npm ERR! node v4.0.0
npm ERR! npm  v3.3.5
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bufferutil@1.1.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bufferutil package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/sandropalmieri/npm-debug.log

我已经尝试了几次使用sudo运行这个命令,但是仍然得到这种错误。你知道是怎么回事吗?你能帮忙吗?谢谢

ilmyapht

ilmyapht1#

尝试将--no-optional添加到npm安装命令中。
您使用的是npm 3.3.3吗?请在此处查看问题:https://github.com/ember-cli/ember-cli/issues/4873

jvidinwx

jvidinwx2#

安装节点
节点-v
第12.14.1版
该NPM
/usr/本地/bin/npm
网络管理-v
6.13.4
npm安装--保存核心-js @^3
sudo npm安装-g ember-客户端
该ember
/usr/本地/bin/成员
ember-v
ember-客户端:3.16.0
节点:12.16.1
操作系统:达尔文x64

相关问题