-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 7.18.1 ignores publishConfig.registry #3573
Comments
I'm seeing this same issue where a
If I run with a override on the command line, as follows, the publish works as I expect:
I also have auth configured in my
Note there are two registries I use. A I'm running the following:
Thank you! |
Confirming this issue on Windows 10, npm 7.20.1, node 14.17.3.
For now I am adding the following to my "prepublishOnly": "printf \"⚠ NOTE ⚠ There is a bug in npm 7.20 that ignores the registry specified in package.json > publishConfig.registry.\\nUntil this is resolved to deploy a new version of the component library use the following command:\\n\\nnpm publish --ignore-scripts --registry=http://custom-artifactory-repo\\n\\n\" && exit 1" |
Sharing my experience on npm 7.24.2, node 14.18.1, using .npmrc to define the custom registry. Maybe not totally related, but I was having issue on I've been able to bypass the issue putting in .npmrc even
|
The Workaround described above doesn't work for me with node:17 from dockerhub my Workaround (on a Linux environment) is as follows:
|
This is still a problem running:
I have So far as I know, the |
I have the same issue with npm 8.1.2 and Nexus |
Bump. This is still an annoying issue. Error:
publishing to the registry using dind CI on Gitlab worked without much problems before... Please do something about this? |
are you folks still able to reproduce this? we've made some changes to how |
for me it is still broken using node:17 or node:latest from dockerhub. below is the gitlab pipeline job I'm using:
|
can you try updating your npm in one of those containers to see if that resolves the issue? the latest version shipped bundled with node is a few versions behind our latest release |
sure, what should i run |
|
still same error...
|
The bare
The docs for |
We still have the issue on NodeJS 20. Isn't that caused by c929ed1? |
Ok my mistake. In fact, in our case, the bug is triggered by the presence of scoped registries in
package.json: {
"name": "@acme/foo-sdk",
"publishConfig": {
"registry": "https://nexus.acme.dev/repository/npm-releases/"
}
} With this, |
This fixes the issue for us: Subject: [PATCH] ff
---
diff --git a/package.json b/package.json
"publishConfig": {
- "registry": "https://nexus.acme.dev/repository/npm-releases/"
+ "@acme:registry": "https://nexus.acme.dev/repository/npm-releases/"
},
|
Is there an existing issue for this?
Current Behavior
This is similar to issue #1937, which is supposed to be resolved, but I still have it.
npm publish
fails to pick up publishConfig.registry from my package.json, yet it works fine if I provide it in the command line withnpm publish --registry=https://gitlab.com/api/v4/projects/26587846/packages/npm/
I slimmed down my package.json to this, and I'm also providing the full logs on the failure / success cases.
Expected Behavior
No response
Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: