I'm hosting a npm registry on a TFS 2017 server, with the Package Management extension. Its hostname has a single part, dnsXxx
, without any extension like .com
, and is configured on the port 8080
. I'm using a .npmrc
file to define this repository for packages in the scope @abc
:
@abc:registry=http://dnsXxx:8080/tfs/.../npm/registry/
@abc:proxy=null
@abc:always-auth=true
When I tried to install one of its packages, using a command like npm i @abc/mypackage
, from the folder containing the .npmrc
file, the command is taking a long time to finally fail with npm ERR! 503 Service Unavailable: @abc/mypackage@...
.
Using WireShark, I figured out that the url called by npm has been modified, I guess "normalized" that way: GET http://www.dnsXxx.com/tfs/.../npm/registry/@abc%2fmypackage HTTP/1.1
, resulting in:
- Port is missing
www.
host prefix and.com
host extension have been added improperly
If I call the fixed url in a browser, http://dnsXxx:8080/tfs/.../npm/registry/@abc%2fmypackage
, I get the expected JSON answer.
Does anyone see a solution?