I updated to the latest express release candidate but it didn't seem to update the express(1) executable, which is stuck on version 2.4.3. I tried
npm uninstall express -g
To no avail. I also tried
npm update express -g
Which seems to have updated my express files in /usr/local/lib to 3.0.0rc4 but the express(1) executable still shows version 2.4.3 when I do express -v
When you update express to the latest version with:
$ npm install -g express
I was going from express 3.0.0rc3
release, to 3.1.0
. The newest versions places the express(1) executable at /usr/local/share/npm/bin/express
but checking the version:
$ express --version
3.0.0rc3
That's not right. I just installed 3.1.0, what's going on?
I came here and saw Peter Lyons answer:
$ which express
/usr/local/bin/express
Yeah that's not right, I want the one at /usr/local/share/npm/bin/express
. So I deleted it based on his answer, and:
$ express --version
-bash: express: command not found
What the eff? Ahhh, I need to either quit the terminal (cmd+Q) and restart it. Or as Peter has commented below use hash -r
to refresh the path hashes.
When that's done:
$ which express
/usr/local/share/npm/bin/express
$ express --version
3.1.0
Good, its fixed! Now back to what I was actually going to do with express...I can't even remember now.
Type which express
to see where the executable is in your filesystem. You probably have more than one version installed and once you understand which is where you can uninstall/delete them.