Closed mamobyz closed 9 years ago
Configuring a virtual host in CouchDB for the npm-registry-couchapp is not always an option.
This is true. I have a fix in mind and it's pretty easy to implement, so I'll probably get that out today and include it in npm@2.0.3
. It turns out that url.resolve
is a little tricky to use correctly!
Great, thanks!
Here is another example of a not working non-root registry. Please consider this in your fix. Thanks!
This is actually a bit more involved than I originally thought it was, but my current goal is to get this into npm@2.1.6
, which will become npm@next
this upcoming Thursday. There are a bunch of minor fixes I need to make to npm-registry-client
to deal properly with non-root registry base URLs. Sorry for the delay!
I am experiencing the same issue as described in https://github.com/npm/npm-registry-couchapp/issues/199. The issue is caused by the changes in npm-registry-client/lib/adduser.js done in the commit c96fc63f54a5c81620ee5e21b1d37c816f9e97d6. There
url.resolve()
is used to replacerequest.toRegistryURL()
, so that the path segments of the registry URL get truncated. For instance, in case of npm-registry-couchapp, the base URL has the shape ofhttp://host:port/registry/_design/app/_rewirte
. After applyingurl.resolve()
, the request URL looks likehttp://host:port/-/user/org.couchdb.user:*
, which is rejected by CouchDB, since the dash sign in the URL is recognized as a database name which is not allowed in CouchDB.Configuring a virtual host in CouchDB for the npm-registry-couchapp is not always an option.