there was the same problem, if you have already installed several node packages and the node_modules folder already exists, try deleting it manually and restarting the npm installation command.
try creating the package.json file as follows:
package.json
{ "name": "module-name", "version": "1.0.0", "description": "", "author": "Your Name", "dependencies": { "express": "4.2.x" }, "license": "" }
and run npm install in this folder
EDIT: just mentioned that you are trying to install express globally, this is not required, express is installed via npm install express --save (--save creates a dependency in the .json package).
npm install express
express generator
Another option is to install an express generator that is installed globally;)
npm install express-generator -g
and create your initial project this way
source share