Npm installation does not work on Windows 7 without any errors

I am new to node and installed the latest version of nodejs on Windows 7 from the windows installer for node. For me, node installation does not work without any errors. After team

npm install -g express 

Cursors just wait and wait without showing any error messages . node (v 0.12.2) and npm (v2.7.4)
Any help is much appreciated. Thanks!!

+5
source share
2 answers

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 --save 

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

+1
source

enter image description here

check proxy settings.
npm config get proxy

If the proxy server is correct, you could cancel the installation in the middle.

If you have done this, delete the folder named "node_modules" in your current directory (installation folder), which will be created during installation.

and reboot the installation (type npm install)

0
source

All Articles