-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ncu -g
errorously reports everything up to date when there's broken symlinks
#235
Comments
Thank you for reporting. I thought that ncu was just ignoring broken symlinks and still checking other dependencies as normal. Are you saying that your other deps are not getting updated either? |
Yes, that's exactly what I'm saying. Here's a screenshot of what happens before I symlink a package (the package is Steps to reproduce:
I don't know how npm-check-updates works internally but I have a hunch this issue may be related: npm/npm#9564 Maybe add it to a FAQ of known issues while waiting for npm to fix it? |
Thank you for the clear explanation and steps to reproduce! Will definitely On Mon, May 9, 2016 at 6:27 AM Stian Didriksen notifications@github.com
|
It appears this is very much the result of npm/npm#9564. I'll be watching that issue closely. |
For others who are experiencing this issue, a quick way to way to see if you have dead symlinks is this:
If anything says |
How do we resolve the issue? If I do ncu(picks it from from package.json and even on bower.json), it says upto date. But shows the versions upgrade needed when I go into each dependency file and do ncu -m bower.json. I did "$ less $(npm -g prefix)/lib/node_modules/", and says "** is a directory". |
@tejeswar491 npm/npm#9564 needs to be fixed since this is a dependency bug. |
If you have a broken symlink in your global node_modules
ncu
will fall back to the default "Everything is up to date:-)" message.It's pretty easy to encounter this if your contributor workflow involves
npm link
on forks of other peoples npm packages to test your patches before submitting your PRs.If it's a one-off contribution it's likely you'll delete your local git checkout and replace the symlink with the version tag that contains the changes from your PR and all is fine in userland.
Except you forgot to remove the symlink in the global node_modules folder and the next time you run
ncu -g
you'll start to get suspicious when there's 6 months since you updated your global deps and you can't believe none of your deps is outdated yet.Also, this happens: npm/npm#12342
It's out of scope to expect ncu reporting broken symlinks as an extra service. But it would be nice if it simply ignored broken symlinks and reported the other deps status as usual 😃
The text was updated successfully, but these errors were encountered: