I have installed new version of npm in the custom directory .npm-global/bin and removed it from /usr/local/bin. The new path is declared:


and the new npm is found with which:

which npm

However, it still attempts to run from the old path and fails:

-bash: /usr/local/bin/npm: No such file or directory

Any idea what is wrong here?


The old path is still cached by the shell. Either open a new tab/window or run hash -r to clear it.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .