安装

时间:2015-10-27 18:58:31

标签: node.js coffeescript

Joeris-MacBook-Pro:~ Joericblom$ npm install -g coffee-script
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "coffee-script"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! path /usr/local/bin/coffee
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall unlink

npm ERR! Error: EACCES: permission denied, unlink '/usr/local/bin/coffee'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, unlink '/usr/local/bin/coffee']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'unlink',
npm ERR!   path: '/usr/local/bin/coffee' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.
npm ERR! error rolling back Error: EACCES: permission denied, unlink '/usr/local/bin/coffee'
npm ERR! error rolling back     at Error (native)
npm ERR! error rolling back  { [Error: EACCES: permission denied, unlink '/usr/local/bin/coffee']
npm ERR! error rolling back   errno: -13,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   syscall: 'unlink',
npm ERR! error rolling back   path: '/usr/local/bin/coffee' }

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Joericblom/npm-debug.log
Joeris-MacBook-Pro:~ Joericblom$ 

有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

错误说:Error: EACCES: permission denied

您需要管理员权限才能全局安装,因此您需要在sudo之前添加命令 像这样:sudo npm install -g coffee-script