使用节点安装jshint

时间:2012-02-07 10:47:58

标签: node.js command-line npm jshint

我在安装jshint的命令行界面时遇到问题。我已经删除了节点,安装了home brew然后重新安装了最新版本的节点,但我仍然遇到错误,请参阅下文。

npm ERR! Error: ENOENT, no such file or directory '/usr/local/lib/node_modules/jshint/bin/hint'
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 10.8.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "jshint"
npm ERR! cwd /Users/macintosh/Dropbox/Sites/2012/Jan/Template/Assets/Scripts/Lint
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! path /usr/local/lib/node_modules/jshint/bin/hint
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/usr/local/lib/node_modules/jshint/bin/hint'
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/macintosh/Dropbox/Sites/2012/Jan/Template/Assets/Scripts/Lint/npm-debug.log
npm not ok

这可能是权限问题吗?提前致谢

1 个答案:

答案 0 :(得分:2)

  

这可能是权限问题吗?

是的,这是一个权限问题,但this answer显示了如何通过NVM安装节点