Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

error "npm WARN unmet dependency" after "npm install" #62

Closed
barrystaes opened this issue Dec 9, 2014 · 16 comments
Closed

error "npm WARN unmet dependency" after "npm install" #62

barrystaes opened this issue Dec 9, 2014 · 16 comments

Comments

@barrystaes
Copy link

First use and dabbing in node and gulp, so perhaps i'm doing something wrong.

As instructed by the readme.md i ran

sudo npm install

and got this result:

barry@crunchbang-barry:~/gitclones/gulp-starter$ sudo npm install
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/browser-sync/node_modules/cl-strings requires lodash@'~2.4.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/browser-sync/node_modules/opt-merger requires lodash@'^2.4.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/browser-sync/node_modules/glob-watcher/node_modules/gaze/node_modules/globule requires lodash@'~1.0.1' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/browser-sync/node_modules/localtunnel/node_modules/request/node_modules/form-data requires mime@'~1.2.2' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws requires commander@'~0.6.1' but will load
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/browser-sync/node_modules/commander,
npm WARN unmet dependency which is version 2.3.0
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-build/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/block-stream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-build/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-build/node_modules/download/node_modules/decompress/node_modules/tar/node_modules/fstream requires mkdirp@'0.5' but will load
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-build/node_modules/download/node_modules/mkdirp,
npm WARN unmet dependency which is version 0.3.5
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download requires nopt@'^2.2.0' but will load
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/nopt,
npm WARN unmet dependency which is version 3.0.1
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires nopt@'^2.2.0' but will load
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/nopt,
npm WARN unmet dependency which is version 3.0.1
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-build/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download requires nopt@'^2.2.0' but will load
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/nopt,
npm WARN unmet dependency which is version 3.0.1
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires nopt@'^2.2.0' but will load
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/nopt,
npm WARN unmet dependency which is version 3.0.1
npm WARN unmet dependency /home/barry/gitclones/gulp-starter/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin/node_modules/bin-wrapper/node_modules/download/node_modules/decompress requires mkdirp@'^0.3.5' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
@barrystaes barrystaes changed the title "npm install" fails with "WARN unmet dependency". "npm WARN unmet dependency" after doing "sudo npm install" Dec 9, 2014
@barrystaes barrystaes changed the title "npm WARN unmet dependency" after doing "sudo npm install" error "npm WARN unmet dependency" after "npm install" Dec 9, 2014
@greypants
Copy link
Contributor

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.

@greypants greypants reopened this Jan 4, 2015
@sethblanchard
Copy link

@greypants
Copy link
Contributor

☝️ 👍 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.

@barrystaes
Copy link
Author

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 npm@1.4.28
3 info using node@v0.10.33
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 npm@1.4.28
3 info using node@v0.10.33
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$ 

@barrystaes
Copy link
Author

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.

@leolanese
Copy link

this works for me:

rm node_modules -r
npm install

@movever
Copy link

movever commented May 18, 2015

@sirWilliam thanks

@fuchao2012
Copy link

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

@movever
Copy link

movever commented Jun 3, 2015

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

@freshben
Copy link

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.

@srmob
Copy link

srmob commented Mar 10, 2016

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

@ashuyadav
Copy link

@movever. Thanks, it worked. :)

@JonthueM
Copy link

JonthueM commented Jun 8, 2016

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

@JonthueM
Copy link

JonthueM commented Jun 8, 2016

It keeps saying
npm install

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

Anddddd.... nothing!

@sethblanchard

@TrederusMaximus
Copy link

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/

@fuchao2012
Copy link

thanks @movever , god bless u.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests