node.js - npm install gives error "can't find a package.json file" -


npm install / npm install -g command not working in windows 7

node.js installed properly, node.js version v0.10.28

couldn't read dependencies
enoent, open '"filepath"\package.json'
not problem npm itself.
npm can't find package.json file in current directory.

photo

you don't module want install - hence npm looks file package.json describes dependencies, , file missing.

so either have explicitly tell npm module install, e.g.

npm install express 

or

npm install -g express-generator 

or have add package.json file , register modules here. easiest way such file let npm create 1 running

npm init 

and add need. please note work locally installed modules, not global ones.

a simple example might this:

{   "name": "myapp",   "version": "0.0.1",   "dependencies": {     "express": "4.0.0"   } } 

or that. more info on package.json file see official documentation , this interactive guide.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -