npm won't update, dependency errors #4035

Closed
ghost opened this Issue Oct 24, 2013 · 20 comments

Comments

Projects
None yet
2 participants
@ghost

ghost commented Oct 24, 2013

Once in a while, I do a "sudo npm update -g" just to make sure everything on my system (Ubuntu) is current. This time, I get dependency errors and I can run update 20 times and I get the same results. (below, using pastebin since the output is very long)

http://pastebin.com/1CFcC7rv

@ghost

ghost commented Oct 29, 2013

Anyone?

Contributor

luk- commented Oct 29, 2013

Can you post the full log?

On Monday, October 28, 2013, CaptSaltyJack wrote:

Anyone?


Reply to this email directly or view it on GitHubhttps://github.com/isaacs/npm/issues/4035#issuecomment-27271032
.

@ghost

ghost commented Oct 29, 2013

There is no log file, that's all the output available. PS: This is happening on Mac OS as well.

Contributor

luk- commented Oct 29, 2013

Can try with --loglevel verbose and gist the output again please?

@ghost

ghost commented Oct 31, 2013

What should I do? Should I just rm -rf /usr/lib/node_modules and start over?

Contributor

luk- commented Nov 1, 2013

I'm really not sure what's going on, I guess you could try that if you want.

@ghost

ghost commented Nov 1, 2013

Nope, wiped out everything (/usr/local/lib/node_modules (I'm currently on the Mac) and ~/.npm) and did a sudo npm update -g and it still updates every time I run it. Here's the full log now of the update output (having just removed ~/.npm):

https://gist.github.com/CaptSaltyJack/7fce01543838164d73eb

@ghost

ghost commented Nov 1, 2013

I'm starting to feel like this might be a bug in npm (v1.3.13). Or node itself (v0.10.21).

Member

timoxley commented Jan 8, 2014

@captsaltyjack other than the error messages, are you actually experiencing any broken behaviour? Most of the complaints appear to be just warnings:

npm info it worked if it ends with ok
...
npm info ok 

Also, can you try again after updating to latest npm (1.3.23)?

@ghost

ghost commented Jan 8, 2014

No more dependency errors. But sudo npm update -g is still ignoring my .npmrc file which contains:

loglevel = warn

I get a ton of output dumped out when I do an update. This used to not be the case (I'd see nothing unless something was actually updated).

Member

timoxley commented Jan 8, 2014

@captsaltyjack my guess is that is because during sudo you act as the root user, and the root user likely doesn't use your user's .npmrc. You may be able to add it to root's $HOME/.npmrc or you could run npm config get globalconfig to get the path to the global .npmrc (create it if it doesn't exist), and add it there.

@ghost

ghost commented Jan 8, 2014

Added loglevel = warn to /usr/local/etc/npmrc and the output is still very verbose. Any other ideas?

Member

timoxley commented Jan 8, 2014

loglevel = silent? loglevel = error?

@ghost

ghost commented Jan 8, 2014

Both do nothing. I have a feeling the loglevel config variable is being ignored.

Member

timoxley commented Jan 8, 2014

I think I know what this is. Tell me, do your http logs have npm in front of them or not?

@ghost

ghost commented Jan 8, 2014

Nope. They look like this:

http 304 https://registry.npmjs.org/bower-config/latest
info trying registry request attempt 1 at 11:06:46
http GET https://registry.npmjs.org/bower-config
http 304 https://registry.npmjs.org/bower-json/latest
info trying registry request attempt 1 at 11:06:46
http GET https://registry.npmjs.org/bower-json
http 304 https://registry.npmjs.org/bower-logger/latest
info trying registry request attempt 1 at 11:06:46
http GET https://registry.npmjs.org/bower-logger
http 304 https://registry.npmjs.org/bower-registry-client/latest
http 304 https://registry.npmjs.org/chalk/latest
Member

timoxley commented Jan 8, 2014

ahh ok. I have a feeling this logging issue might be fixed in the next release of npm.

Using the latest master with --loglevel=warn produces minimal output for me, if it's not fixed in the next release, please open a new issue and cc me, I believe it's somehow related to the stuff I was playing with here npm/npm-registry-client#36

Member

timoxley commented Jan 9, 2014

@captsaltyjack I believe this particular issue can be closed now, as your ongoing issue is actually #4186?

#4430

@ghost

ghost commented Jan 9, 2014

Yep, sounds good!

ghost closed this Jan 9, 2014

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment