我是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