-
-
Notifications
You must be signed in to change notification settings - Fork 34
_auth being set causing 500 error on scopes #106
Comments
@mlaccetti may be able to post the |
We have a private registry (based on Nexus 3) for our internal libraries; that's what the auth is for. |
I take it the Where is the reference to the private registry itself handled? In a local configuration file? |
@guybedford The registry in the package.json:
|
I guess what we need to do here is see if npm is really just ignoring the 500 response, and then disabling the auth, and if so then we can just copy that behaviour (retrying and then not using auth for subsequent requests). Otherwise if there is some way npm knows specifically not to use the invalid auth, then we should make sure to implement that mechanism. |
Looks like it does some other checks:
|
Excellent, thanks - so we just need to find out what exactly it is that lets npm know that no auth is needed. There doesn't seem to be any header or metadata present informing this for this specific request, so it must be based on getting a different type of response for scoped packages that are private and do need auth, which would be worth investigating with a test case further what metadata that provides this with. |
Looks like they perform a few checks to see if they should auth - https://github.com/npm/npm-registry-client/blob/master/lib/request.js#L60 - basically, never auth! |
Ok, so we should just never auth unless |
The only thing that confuses me about that is does that mean that |
Ok it is definitely not retrying for an unauthed response, so perhaps it really just is |
I think these are the rules for setting the creds:
From what I have read, if you have a private registry that requires auth for reading, you have to set |
Thanks, that's an excellent summary - we can go ahead and implement exactly that then. |
running into this issue. currently using jspm 0.16.53. has any progress been made on this? |
@lj1000 this may have been a regression in 0.26.14. Did you try 0.26.13? |
thanks guybedford. |
sorry guybedford. |
Hi I recently tried 0.17.0-beta.47 and still having this issue. has there been any progress incase im missing something. |
i removed the installed jspm-npm folder and installed the 0.30.2 version. still getting same error Error on lookup for npm:mypackage but works fine with npm i mypackage |
Not sure what the exact credentials were, but with a case where npm was configured for an organization (I'm not sure if it was running against the public registry or the organization mirror), but
@reactive/rxjs
apparently was giving a 500 error on lookup.The text was updated successfully, but these errors were encountered: