Code Monkey home page Code Monkey logo

Comments (16)

greypants avatar greypants commented on August 19, 2024 7

☝️ 👍 I watched @sethblanchard run into the same thing. Some weird npm setup issue. This bit from the SO answer post above seemed to fix it:

rm -rf $HOME/.npm
npm cache clean

I'll leave this open for a while just for visibility.

from blendid.

leolanese avatar leolanese commented on August 19, 2024 3

this works for me:

rm node_modules -r
npm install

from blendid.

movever avatar movever commented on August 19, 2024 2

@fuchao2012 I think you can try
npm cache clean
then rm node_modules & reinstall
It works for me

from blendid.

TrederusMaximus avatar TrederusMaximus commented on August 19, 2024 2

I found the solution! There is something wrong with the path!
If you run:

npm install -g gulp

you can see the path in one of the first rows depending on how much suff is put out in general. Keep lookig and you will see!

THIS PATH MAY DIFFER TO WHAT

npm root

OUTPUTS! - I checked npm root and thought I was fine but wasn't!

Here is what to do to fix your issue:
http://blog.webbb.be/command-not-found-node-npm/

from blendid.

greypants avatar greypants commented on August 19, 2024

Hm... Shouldn't have to use sudo unless installing something globally. In the readme, I'd originally said to do that with gulp, but have JUST updated that bit. Did you try without sudo? I can't replicate.

from blendid.

sethblanchard avatar sethblanchard commented on August 19, 2024

This fixed it for me: http://stackoverflow.com/questions/23800562/global-npm-install-failing-on-osx

from blendid.

barrystaes avatar barrystaes commented on August 19, 2024

I've since clobbered this VM and it currently does NOT reproduce the issue. (sorry)
But FWIW i ran these commands anyway .. in case this output can be of use.

barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ npm --version
1.4.28
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ sudo npm install
[sudo] password for barry: 
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/home/barry/Projects/gitClones/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 Linux 3.2.0-4-486
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/barry/Projects/gitClones
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /home/barry/Projects/gitClones/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/barry/Projects/gitClones/npm-debug.log
npm ERR! not ok code 0
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ cat npm-debug.log 
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 error install Couldn't read dependencies
6 error package.json ENOENT, open '/home/barry/Projects/gitClones/package.json'
6 error package.json This is most likely not a problem with npm itself.
6 error package.json npm can't find a package.json file in your current directory.
7 error System Linux 3.2.0-4-486
8 error command "/usr/bin/node" "/usr/bin/npm" "install"
9 error cwd /home/barry/Projects/gitClones
10 error node -v v0.10.33
11 error npm -v 1.4.28
12 error path /home/barry/Projects/gitClones/package.json
13 error code ENOPACKAGEJSON
14 error errno 34
15 verbose exit [ 34, true ]
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ rm -rf $HOME/.npm
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ npm cache clean
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ sudo npm install
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/home/barry/Projects/gitClones/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 Linux 3.2.0-4-486
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/barry/Projects/gitClones
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /home/barry/Projects/gitClones/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/barry/Projects/gitClones/npm-debug.log
npm ERR! not ok code 0
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ cat npm-debug.log 
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 error install Couldn't read dependencies
6 error package.json ENOENT, open '/home/barry/Projects/gitClones/package.json'
6 error package.json This is most likely not a problem with npm itself.
6 error package.json npm can't find a package.json file in your current directory.
7 error System Linux 3.2.0-4-486
8 error command "/usr/bin/node" "/usr/bin/npm" "install"
9 error cwd /home/barry/Projects/gitClones
10 error node -v v0.10.33
11 error npm -v 1.4.28
12 error path /home/barry/Projects/gitClones/package.json
13 error code ENOPACKAGEJSON
14 error errno 34
15 verbose exit [ 34, true ]
barry@crunchbang-barry:~/Projects/gitClones/gulp-starter$ 

from blendid.

barrystaes avatar barrystaes commented on August 19, 2024

Again had this problem, since this "sudo npm" problem was fixed using
$ npm config get prefix /usr/local/ $ sudo chown -R whoami /usr/local/

I tried the remedy from @greypants again, but it only started working after i did a rm node_modules -r.

I'm not sure whats going on, all this might even be unrelated.
Seems the npm install process got killed halfway through last time, and the files where left in lingo but it didnt detect that. Shouldn't npm log and register problems like that? I see a NPM WARN for the slightest deviation, but aborted installs are not detected yet.

from blendid.

movever avatar movever commented on August 19, 2024

@sirWilliam thanks

from blendid.

fuchao2012 avatar fuchao2012 commented on August 19, 2024

got the same issue. can't deal with the proxy in windows. and rm node_modules & reinstall can't work again

from blendid.

freshben avatar freshben commented on August 19, 2024

Sorry to comment on an old issue, wanted to add more info for posterity. Following the instructions listed by sirwilliam should work. For broken global installs, remove your global node_modules directory instead. More details here.

from blendid.

srmob avatar srmob commented on August 19, 2024

rm -r node_modules and then re-install npm helped me.

from blendid.

ashuyadav avatar ashuyadav commented on August 19, 2024

@movever. Thanks, it worked. :)

from blendid.

JonthueM avatar JonthueM commented on August 19, 2024

I have tried and it wont work with me. I am using Fedora 23 @srmob

from blendid.

JonthueM avatar JonthueM commented on August 19, 2024

It keeps saying
npm install

I tried to
rm -rf $HOME/.npm
rpm cache clean
sudo npm install -g gulp

Anddddd.... nothing!

@sethblanchard

from blendid.

fuchao2012 avatar fuchao2012 commented on August 19, 2024

thanks @movever , god bless u.

from blendid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.