-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npm ci respect the resolved url in package-lock.json #2004
Comments
This comment has been minimized.
This comment has been minimized.
Is this still a problem for you in the latest npm? |
We're having similar issues where we have The only solution is so delete |
My company has seen something similar. We have regional Artifactory servers that we use to for hosting a common npm registry. From a client perspective, there is a single registry and based on their IP, they will get redirected automatically to the appropriate regional server. Recently we retired one of these servers, which caused some of our projects to exhibit the same error signature mentioned in this issue. The registry in the .npmrc is something similar to It would be good if npm had an option when running 'npm ci' to ignore the resolved URLs and use the configured @rodoabad You beat me to it. 😃 |
Seeing this in 7.20.0 as well @wraithgar |
We have had this issue as well since migrating to npm v7. For our local development, we use an SSH tunnel to reach our private registry. Hence the "tunnel"-URL (e.g. tunnel.private.registry.com:XXXX) is written to the package-lock.json. When doing the build on our Jenkins server we can directly address the registry (private.registry.com) but npm only searches the package at the URL which is written to the package-lock.json. Adding When we switch back to npm v6 it works without a problem, also with the package-lock format v2.
|
Any schedule for this blocker? |
Same problem: our CI agent is in azure and it must access our private registry with a different url than the one we use in local development. So the "resolved" url cannot be reached in CI. Any plan to fix this issue ? |
Ugly solution that may, or may not be good practice. 😬
|
years have gone with this bug without a fix so far. Any chance this gets fixed anytime? |
pnpm or yarn does not have such problems right? thinking about switching anyways |
omit-lockfile-registry-resolved Was added as a solution to this problem. You can make lockfiles without a resolved entry so that they can be re-calculated at runtime in case you have constantly changing registry urls. |
I use local verdaccio npm cache so I can fully work offline, do npm install offline etc, so my resolved field looks like:
"resolved": "http://localhost:4873/@babel%2fcore/-/core-7.12.3.tgz",
Current Behavior:
npm ci respect the resolved url in package-lock.json
It looks like, the problem is because the error is
ECONNREFUSED
.On my mac, with local verdaccio stopped, npm ci works well.
Expected Behavior:
Before npm 7, my CI is working well because npm ci ignoring this field.
With npm 7, npm ci respect this field and don't try another way to retrieve packages.
I think we should find a way to respect resolved field and try another way if the resolved field doesn't work.
Steps To Reproduce:
npm ci
Environment:
OS: Max OS 10.15.7
Node: 14.14.0
npm: 7.0.2
CI: Gitlab CI + docker runner
The text was updated successfully, but these errors were encountered: