Open nelsonleblanc-rl opened 3 weeks ago
I also encountered the same problem
It seems like ignores the CA file.
I'm getting couldn't find the registry
for the standard registry.npmjs.org
. Why wouldn't that be recognised?
Full message:
1 | //registry.npmjs.org/:_authToken=npm_alsjdflkasjdhflaksjdhflaksjdhflkajs
^
warn: The following .npmrc registry option was not applied:
//registry.npmjs.org/:_authToken=npm_alsjdflkasjdhflaksjdhflaksjdhflkajs
Because we couldn't find the registry: registry.npmjs.org/.
at /home/username/.npmrc:1:34
bun install v1.1.30-canary.149 (7996d06b)
Checked 1 install across 2 packages (no changes) [3.00ms]
I'm sure this used to work no problem, broke in a recent release (last few months).
In one of my projects it works when I use https://...
instead of //...
But that notation doesn't work for (p)npm
This might be a bug in bun where it incorrectly understands .npmrc. The npm cli strips _authToken
's schema part by intention:
What it does is basically 1) grab the registry URL, 2) use the schema-less part (where it calls nerf
) to match the token key, and extract the token.
*
if included in a log.Thanks Dylan!
What version of Bun is running?
1.1.30+7996d06b8
What platform is your computer?
Darwin 23.6.0 arm64 arm This also happens on Linux / amd64
What steps can reproduce the bug?
running
bun install
prints npm registry authentication credentials when an .npmrc has registry options without an associated registry definition..npmrc example (redacted):
Our .npmrc exists this way to support when a legacy registry needs to be used.
What is the expected behavior?
What do you see instead?
Bun prints a warning with the auth value when
bun install
is executed:Additional information
No response