1

I set up a Nexus group and proxy (as describe in the nexus 3 documentation) to cache my npm libs in my internal enterprise network. I configured my .npmrc as follows:

registry=http://<repo url>/repository/<group>/
email=admin@company.com
_auth=YWRtaW46YWRtaW4=

When I start npm install in verbose mode I get an output like below (just an excerpt, the are many 404's):

....
fetch GET 200 http://<repo-url>/repository/<group>/camelcase 390ms
http fetch GET 200 http://<repo-url>/repository/<group>/run-sequence 171ms
fetch GET 200 http://<repo-url>/repository/<group>/lru-cache 343ms
http fetch GET 200 http://<repo-url>/repository/<group>/gulp 260ms
http fetch GET 200 http://<repo-url>/repository/<group>/tslint 591ms
httphttp fetch GET 200 http://<repo-url>/repository/<group>/gulp-flatten 193ms
 fetch GET 404 http://<repo-url>/repository/<group>/typescript 578ms
httphttp  fetchfetch GET 200 http://<repo-url>/repository/<group>/glob-stream 274ms
....

which finally leads to:

npm verb type OperationalError
npm verb stack Error: 404 Not Found: typescript@2.4.2
npm verb stack 
   at fetch.then.res ...

but when I call the failed artifact URL's (failed with 404) with my browser, I get the metadata of the appropriate artifact without any problem.

What I tried so far:

  • added/removed enterprise proxy: no change
  • used the proxy repository directly: I then get a ECONNRESET for each artifact although the URL is reachable in my browser
jsalvas
  • 87
  • 2
  • 10

1 Answers1

0

OK it came out that my enterprise proxy was still set globally. I must have somehow executed npm config set ... once before. But: When I removed the proxy using npm config rm https_proxy it started working perfectly! So finally it was a proxy issue (for whatever reason).

It is still a little bit strange as the nexus url starts with http and not https, so I would not have expected an issue with the https proxy here. But I toggled it several times to make sure that this was really the issue and indeed it is. This could be an npm bug.

jsalvas
  • 87
  • 2
  • 10