我是node.js的新手,我通过从节点网站运行安装来安装它。我有一个游戏安装包在全球范围(如应该),但现在我想在我的Mac 安装塔模块,像这样:安装塔模块时遇到的问题-WS模块崩溃
sudo npm install tower -g
它安装了一堆东西,然后崩溃,与输出
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
> [email protected] install /usr/local/lib/node_modules/tower/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> node install.js
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
node.js:520
var cwd = process.cwd();
^
Error: EACCES, permission denied
at Function.startup.resolveArgv0 (node.js:520:23)
at startup (node.js:54:13)
at node.js:611:3
npm ERR! [email protected] install: `node install.js`
npm ERR! `sh "-c" "node install.js"` failed with 11
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls ws
npm ERR! There is likely additional logging output above.
如果我正确地阅读它是ws(websockets?)模块崩溃。
在研究这个问题时,我将节点路径添加到我的.bashrc中,所以我已经完成了这个工作。
有什么建议吗?
我会尝试安装节点与自制软件,一切都很顺利,然后。 'brew install node' – 2012-08-01 07:18:36