Deprecated version of express doesn't upgrade

November 24, 2014 2.3k views

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 

Anybody any Idea ?

1 Answer

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/ 
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
root@mean-test:/opt/mean# express --version
Have another answer? Share your knowledge.