I just tried to update my version of express to 4.0.0
I used sudo npm install -g express and I can see the newest version has already been installed on my laptop.
However, when I type express -v, the version is still 2.5.8. How to change it to 4.0.0?
Thank you
Express has removed the bundled generator from the main project, to update the express generator use this command:
$ sudo npm install -g express-generator
Then when you'll do express -V:
$ 4.0.0
You might get an error like:
Error: Refusing to delete: /usr/bin/express not in /usr/lib/node_modules/express-generator
If you do, just uninstall the v3 express generator like:
$ sudo npm uninstall -g express
Then do the commands above again.
Something else seems wrong with your installation, force the deletion of express v3:
$ sudo rm -rf $(which express)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With