I am new to node and have installed latest version of nodejs on windows 7 from windows installer for node. For me node install is not working without giving any error. After giving command
npm install -g express
Cursors just waits and waits without showing any error message
node(v 0.12.2) and npm(v2.7.4)
Any help is highly appreciated. Thanks!!
had the same problem once, in case you installed some node packages before and there is already an node_modules folder try to delete it manually and rerun the npm install command.
alternatively try to create a package.json file like this:
package.json
{
"name": "module-name",
"version": "1.0.0",
"description": "",
"author": "Your Name",
"dependencies": {
"express": "4.2.x"
},
"license": ""
}
and run npm install
in that folder
EDIT:
just mentioned you try to install express globally, this is not needed, express is installed via npm install express --save
(--save creates a dependency in the package.json file).
npm install express --save
express-generator
Another option would be to install the express-generator ,this one is installed globally ;)
npm install express-generator -g
and generate your initial project this way
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