Reputation: 71
For example I tried installing npm serve globally
$ npm install -g serve
but after seemingly successfully installing it, I was unable to run the serve executable. Seems like the command just could not be found. Turns out the exe serve file was located in:
usr/local/share/npm/bin
rather than in what I thought should be (where all the other executable files are):
usr/local/bin
Any idea why I can't seem to get this to work?
Upvotes: 2
Views: 2349
Reputation: 9492
Similar to this answer, create/edit ~/.npmrc
to include:
prefix = /usr/local/bin
Upvotes: 3