使用Windows很长时间后,我刚买了一台Mac Book。
我试着在一个我一直在做的MeanJS项目上工作。在该项目上进行npm install
时会抛出错误。
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/Aayush/Work/lishn/repo/lishn-alpha/node_modules/grunt-node-inspector/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.4.6/node-v46-darwin-x64/debug.node --module_name=debug --module_path=/Users/Aayush/Work/lishn/repo/lishn-alpha/node_modules/grunt-node-inspector/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.4.6/node-v46-darwin-x64' (1)
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE
>
> npm ERR! v8-debug@0.4.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug@0.4.6 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the v8-debug package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-debug
npm ERR! There is likely additional logging output above.
我尝试清除缓存。
我尝试使用sudo
和--unsafe-perm
安装node-pre-gyp。
我还尝试了安装一个新的MEAN项目,但出现了同样的错误。
我似乎找不到问题所在。
Node Version - 5.0.0
NPM Version - 3.3.10
4.2.x
,因为它是最新的长期支持版本,仅在几周前发布。如果它可以工作,那么尝试使用5.x
来查看哪些内容会出错,有可能npm模块还没有更新以处理5.x
,因为它只发布了几天?或者至少不要使用sudo与npm或node一起使用,考虑使用nvm
来避免麻烦。 - jmunschnpm ERR!node v4.1.1
。 - jmunsch