我正在尝试使用以下命令安装节点检查器:
sudo npm install -g node-inspector
我得到以下结果:
> ws@0.4.32 install /usr/local/lib/node_modules/node-inspector/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> v8-debug@0.3.5 install /usr/local/lib/node_modules/node-inspector/node_modules/v8-debug
> node-pre-gyp install --fallback-to-build
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-pre-gyp: command not found
> v8-profiler@5.2.3 install /usr/local/lib/node_modules/node-inspector/node_modules/v8-profiler
> node-pre-gyp install --fallback-to-build
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-pre-gyp: command not found
npm ERR! v8-debug@0.3.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the v8-debug@0.3.5 install script.
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.
npm ERR! System Darwin 14.1.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "node-inspector"
npm ERR! cwd /Users/alan
npm ERR! node -v v0.12.0
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
我已经成功安装了 node-pre-gyp 和 ws。