npm is not resolving all dependencies to internal registry #15047
Comments
I forgot to mention that:
It does not change the build result. |
For some reason, the |
Hy @legodude17, thanks for you reply. |
Can you put the new |
here the gist with the new In the I've tested yarn (which can't be used in my project due to limitations) and all dependencies are correctly resolved. IMHO the problem comes from npm itself (or the internal shrinkwrap process). Thanks for your help |
@legodude17 don't @ me <3 |
😕 That wasn't very helpful. Can you get a repro for this @orphaner? |
@orphaner I believe this is working as designed. Once you've shrinkwrapped a dependency to point to a particular registry, it will always try to get it from there. Did you install those before changing the registry? You might be able to just do a replace on the shrinkwrap and that might fix it for the future. |
Some problem here. |
I've switched the project to yarn which is working correctly. It is really faster too. |
Hy there,
I'm opening this issue because:
What's going wrong?
I am using npm to build projects of my current customer. We have an internal registry (Nexus 3.1) to:
One another important fact: the build agents does not have a direct internet access, they can only resolve dependencies via the internal registry.
Dependencies to direct github project are not allowed.
=> My problem is that for some transient dependencies, npm is resolving the dependency to registry.npmjs.org instead of my internal registry: the build is stuck trying to access the internet.
My understanding on setting a registry is that all dependencies must be resolved to that registry (like maven do). Here it is not the case.
How can the CLI team reproduce the problem?
Here the gist of my project: https://gist.github.com/orphaner/549355007385cf9b4b824c5269916936 . You'll find the package.json, the verbose log and the npm-shrinkwrap.json file.
For example, you'll see that for no obvious reason, the package adm-zip is resolved to registry.npmjs.org instead of my internal registry.
If I try to execute
npm install adm-zip
in a empty folder: my internal registry is used as expected.supporting information:
npm -v
prints:4.0.2
node -v
prints:v9.6.1
npm config get registry
prints:http://registry.mydomain.com/repository/npm-group
I hope you'll help me to resolve this bug.
Please let me know if you need more information/data or if you want me to experiment some bug fix or workaround.
Nicolas
The text was updated successfully, but these errors were encountered: