Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Npm adduser fails with 404
-
I executed the following steps:
npm config set registry <npm url> npm config set always-auth true npm adduser
After filling the user/pass and email, I get:
npm ERR! 404 Not Found
The result of this is that it's impossible to publish to the feed.
We're using proget 3.6.1 and npm 2.9.1
Product: ProGet
Version: 3.6.1
-
Can you use Fiddler to see what URL is being accessed?
In some version of npm, it was ignoring the registry url, which made adding users impossible. I believe this was fixed however.
-
How do I configure npm to go through Fiddler? Just enabling Fiddler doesn't route npm requests through its proxy.
-
I have the same issue now too. I used fiddler to figure out what it was doing. npm wants to
PUT
tohttp://myserver/npm/private-npm/~/user/org.couchdb.user:myusername
.ProGet responds with the error
Request handler not found (404) An unexpected error has occured while processing your request. /~/user/org.couchdb.user:trm_admin does not map to any handlers. The URL may have been entered incorrectly or linked to from an old reference.
It seems to me that the issue is that ProGet isn't handling that
~
. When I dump the request into postman and remove the ~, everything changes. It doesn't exactly work, since it returns a 401 unauthorized, but at least something different happens.
-
I found my real issue. It seems that my npm was old. Once I updated it, the adduser command worked. Updating npm for the first time on windows is a royal pain though - as you can see in the mess documented here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows
-
npm changes its access URLs a lot, and from looking through its checkin history it usually seems to be accidental. ProGet currently supports two URLs for adduser:
/-/user/org.couchdb.user[...]
or
/npm/[FEED]/-/user/org.couchdb.user[...]
I've never seen any version of npm use a ~ instead of a - before... What version did you upgrade from?