Skip to content
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

Unhandled rejection: Error 401 #278

Closed
tizmagik opened this issue Oct 3, 2016 · 5 comments
Closed

Unhandled rejection: Error 401 #278

tizmagik opened this issue Oct 3, 2016 · 5 comments

Comments

@tizmagik
Copy link

tizmagik commented Oct 3, 2016

I have a dependency that's published to a local artifactory instance. For some reason (probably unrelated to ncu), I get an Unhandled rejection error:

Unhandled rejection Error: Registry returned 401 for GET on https://artifactory.xx.com/artifactory/api/npm/npm-virtual/@scope%2fcustom-module
 ...

If I manually remove this dependency from package.json and then re-run ncu it works as expected. Would it be possible to have ncu handle this rejection and continue checking the other dependencies?

@raineorshine
Copy link
Owner

Yes! Can you try the ncu --reject PACKAGE_NAME feature?

Documented in the README.

@tizmagik
Copy link
Author

tizmagik commented Oct 8, 2016

Ah, sorry I missed that in the README. Yes, that does work!

Although, I wonder if ncu could just handle the error gracefully here? It would be great if it could display an error instead of the version number for that package and resume for the rest of the packages normally?

@raineorshine
Copy link
Owner

Great!

Yes, there are some usability improvements that could be made so this is more graceful. Allowing ncu to continue to check other packages sounds good. If this is run in upgrade mode though I'm not sure if it should go ahead and modify the package.json or error out. I will mark this issue as enhancement. There are some actual bugs that take priority, but this could be a good candidate for a pull request from a new contributor.

@tizmagik
Copy link
Author

tizmagik commented Mar 4, 2018

Hey @rainorshine is this handled differently now or is the --reject still the recommended workaround?

@raineorshine
Copy link
Owner

Same behavior

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

No branches or pull requests

2 participants