0

I'm having issues installing a command line interface for jshint. I have removed node, installed home brew then re installed the latest version of node but I'm still getting errors, see below.

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

Could this be a permissions problem? Thanks in advance

Brad
  • 275
  • 1
  • 4
  • 9
  • the first msg is "no such file or directory '/usr/local/lib/node_modules/jshint/bin/hint'". Are you saying that the file **does** exist and the permissions allow reading it? Do an `ls -l /usr/local/lib/node_modules/jshint/bin/hint` to see the file premission. Edit your question above with the output if you still need help. Good luck. – shellter Feb 07 '12 at 23:04
  • Thanks for your response. I ran that bit of code and it outputted `/usr/local/lib/node_modules/jshint/bin/hint: No such file or directory` – Brad Feb 14 '12 at 12:42
  • so it's not a permissions issue, the file (an possibly a whole directory structure) is missing. continue issuing `ls -l /usr/local/lib/node_modules/jshint/bin` and remove 1 dir at a time from above until you get a dir listing. Then you know what you **do** have, and that will help guide you to figure out what has failed while installing. It could be you don't have permission to intall into /usr/local/lib. Good luck. – shellter Feb 14 '12 at 13:09
  • Thanks for help! I think my terminal was having a bad day, I tracked back to `node_modules` dir and re installed jshint and it's now running fine. – Brad Feb 15 '12 at 10:08
  • Possible duplicate of [NPM throws error without sudo](http://stackoverflow.com/questions/16151018/npm-throws-error-without-sudo) – Alfred Bez Jan 04 '16 at 09:07

1 Answers1

2

Could this be a permissions problem?

Yes, that's a permission problem, but this answer shows how to install node via NVM

Community
  • 1
  • 1
Alfred Bez
  • 1,191
  • 1
  • 14
  • 31