Possible Duplicate:
error installing coffeescript on mac 10.7.2CoffeeScript使用NPM和節點安裝
此刻,我正試圖在我的計算機上安裝CoffeeScript。我有node.js版本0.6.7和npm 1.1.0-beta-10。當我運行命令npm install -g coffee-script時,它顯示這個錯誤。
npm http GET https://registry.npmjs.org/coffee-script
npm http 200 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.2.0.tgz
npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.2.0.tgz
npm ERR! Could not create /usr/local/lib/node_modules/___coffee-script.npm
npm ERR! error installing [email protected]
npm ERR! Error: EACCES, permission denied '/usr/local/lib/node_modules/___coffee-script.npm'
npm ERR! Report this *entire* log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR!
npm ERR! System Darwin 11.0.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "coffee-script"
npm ERR! cwd /Users/Solomon
npm ERR! node -v v0.6.7
npm ERR! npm -v 1.1.0-beta-10
npm ERR! path /usr/local/lib/node_modules/___coffee-script.npm
npm ERR! code EACCES
npm ERR! message EACCES, permission denied '/usr/local/lib/node_modules/___coffee-script.npm'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/Solomon/npm-debug.log
我該如何解決這個問題?
運行它作爲根。您的用戶沒有權限寫入/ usr/local/lib/ – seppo0010 2012-03-05 00:10:48