npm not found

You must Login before you can answer or comment on any questions.

This is to continue a comment thread I was having with a dev about not being able to get npm to work on OSX 10.8, which subsequently won't let me install the Titanium updates.

I've installed nodejs (multiple times,) and there is an npm file in /usr/local/bin but it just shows up as an alias with no source.

The last thing Chris, the dev, said to do was to echo $PATH which gave me: "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin"

— asked 1 year ago by Ron Kirk
1 Comment
  • ouch, thread starter went and locked it when it was getting good too...

    — commented 1 year ago by Stephen Feather

1 Answer

Accepted Answer

OK, so /usr/local/bin is in your path. You say that npm exists in /usr/local/bin when you run ls -l /usr/local/bin/npm. It should be a symlink to /usr/local/lib/node_modules/npm/bin/npm-cli.js.

Does /usr/local/lib/node_modules/npm to exist? Does it contain a "bin" folder? Does the bin folder contain a npm-cli.js file?

What happens if you just run node /usr/local/lib/node_modules/npm/bin/npm-cli.js -v from the command line? Does that work?

— answered 1 year ago by Chris Barber
answer permalink
2 Comments
  • Well, Chris, turns out I'm more of a moron than I had hoped. /usr/local/bin had full permissions, but for some reason /usr/local/lib/ only had permissions on a different admin account. Changed that, and now everything works fine.

    Thanks for your help and patience!

    — commented 1 year ago by Ron Kirk

  • Cool. Glad to hear you got it working. Happy coding! :)

    — commented 1 year ago by Chris Barber

Your Answer

This question has been locked and cannot accept new answers.