Question

Deprecated version of express doesn't upgrade

The version of express in the MEAN stack remains 2.5.8 which is supposed to be deprecated. How do I get it to release 3.x.x or higher ?

I have tried

npm install -g express@3.x.x

and the feedback is that it is installing 3.18.4

/usr/local/bin/express -> /usr/local/lib/node_modules/express/bin/express 
express@3.18.4 /usr/local/lib/node_modules/express

but then after successful install still version 2.5.8 is shown

root@olivettatest:~/projects/getting-MEAN# express --version 
2.5.8

Anybody any Idea ?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

What’s the output of which express ? You seem to have another version installed somewhere on your PATH I suspect you may have installed the version directly from the Ubuntu repositories.

The MEAN sample project installed to /opt/mean on the DigitalOcean one-click app currently installs express 4.9.7:

head -n 1 /opt/mean/node_modules/express/History.md 
4.9.7 / 2014-10-10

With express >= 4.0 the command line tool has move to the express-generator package. It can be installed with:

npm install -g express-generator

Here’s the output of that command:

/usr/local/bin/express -> /usr/local/lib/node_modules/express-generator/bin/express
express-generator@4.9.0 /usr/local/lib/node_modules/express-generator
├── mkdirp@0.5.0 (minimist@0.0.8)
└── commander@1.3.2 (keypress@0.1.0)
root@mean-test:/opt/mean# which express
/usr/local/bin/express
root@mean-test:/opt/mean# express --version
4.9.0