-
-
Notifications
You must be signed in to change notification settings - Fork 950
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
pnpm doesn't get packages from expected registry #7542
Comments
Did you add the config to point your scope to your private registry? |
sure |
Can you try using using the |
Yeah, also seems like |
Yes. use 1. default setting$ pnpm config set registry https://registry.npmjs.org/
$ cat $HOME/.npmrc
strict-ssl=false
registry=https://registry.npmjs.org/ 2. init project$ pwd
/d/git/tmp
$ ls -a
. ..
$ pnpm init
Wrote to D:\git\tmp\package.json
{
"name": "tmp",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": ""
}
$ pnpm i eslint
Packages: +99
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 99, reused 99, downloaded 0, added 99, done
dependencies:
+ eslint 8.56.0
Done in 4.7s 3. switch registry$ pnpm config set registry https://private.registry.cccom/
$ cat $HOME/.npmrc
strict-ssl=false
registry=https://private.registry.cccom/ $ pnpm add a_packages
ERR_PNPM_FETCH_404 GET https://registry.npmjs.org/a_packages: Not Found - 404
3. switch registry (project)$ pnpm config set registry https://private.registry.cccom/ --location project
$ cat ./.npmrc
registry=https://private.registry.cccom/
$ pnpm add a_packages
ERR_PNPM_FETCH_404 GET https://registry.npmjs.org/a_packages: Not Found - 404
|
It was probably fixed by this: #7515 but not published yet. |
I test via |
same problem. |
Verify latest release
pnpm version
8.14.1
Which area(s) of pnpm are affected? (leave empty if unsure)
CLI
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
reproduction sample: #7542 (comment)
pnpm config set registry https://registry.npmjs.org/ [--location project]
(default registry)pnpm init
pnpm i eslint
(or any other packages.)pnpm config set registry https://localhost:56341/ [--location project]
(specify any registry you want)pnpm add a_packages
(pnpm will try to download packages from
npmjs
instead of custom registry. It will get failed because the package doesn't exist innpmjs
)Describe the Bug
after exec
pnpm config set registry
,pnpm add <pkg>
doen't work as expected.I guess it's related to
node_modules/.modules.yaml
, it keeps aregistries
item. Sometimes pnpm will updateregistries
from.npmrc
, but sometimes not. That's so weird, isn't it?Expected Behavior
pnpm should get packages from the custom registry
pnpm should recognize the registry setting in
.npmrc
Which Node.js version are you using?
v20.10.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: