NPM error throws "does not read dependencies"?

NPM throws a "cannot read dependencies" error

yiffbook:home yiff$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/home/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! path npm-debug.log
npm ERR! code UNKNOWN
npm ERR! errno -1
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/npm-debug.log
npm ERR! not ok code 0

Could you help me fix this?

+4
source share
4 answers

Try updating npm, it works for me

[sudo] npm install -g npm

for more information use the link:

+14
source

Are you running npm install from /home.It is trying to find package.json in /home.Where is your node.js project? Example if its in C: \ nodeproject \ pasty.Then go to C: \ nodeproject \ pasty (there will be package.json) and then install npm install

+12
source

, package.json( 2.4 2.4.0).

+2

This happens sometimes due to the availability of the old version npm. Update your npmto the latest version; It may solve your problem. If this is not the case, you can try installing external packages with the version, for example:

  npm install sqlite3.
0
source

Source: https://habr.com/ru/post/1568883/


All Articles