Skip to content
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

change registries pnpm i -g pnpm An error occurred #3361

Closed
reaink opened this issue Apr 16, 2021 · 11 comments
Closed

change registries pnpm i -g pnpm An error occurred #3361

reaink opened this issue Apr 16, 2021 · 11 comments

Comments

@reaink
Copy link

reaink commented Apr 16, 2021

pnpm version:

Code to reproduce the issue:

$ pnpm i -g pnpm
Nothing to stop. No server is running for the store at /root/.pnpm-store/v3
 ERROR  This modules directory was created using the following registries configuration: {"default":"https://registry.npm.taobao.org/"}. The current configuration is {"default":"https://registry.npmjs.org/"}. To recreate the modules directory using the new settings, run "pnpm install".

How can I reinstall the global modules

Expected behavior:

Actual behavior:

Additional information:

  • node -v prints: v14.15.3
  • Windows, macOS, or Linux?: macos
@zkochan
Copy link
Member

zkochan commented Apr 16, 2021

Run pnpm install -g then pnpm install -g pnpm

@reaink reaink closed this as completed Apr 17, 2021
@mwittmann
Copy link

In case anyone else runs into the specific ERR_PNPM_REGISTRIES_MISMATCH error ( "ERR_PNPM_REGISTRIES_MISMATCH  This modules directory was created using the following registries configuration: {"default":"http://registry.npmjs.org/"}. The current configuration is {"default":"https://registry.npmjs.org/"}...") -- Zoltan's solution above worked.

@MrYZhou
Copy link

MrYZhou commented May 18, 2022

Run pnpm install -g then pnpm install -g pnpm

it's right. 对的

@showme2005
Copy link

Run pnpm install -g then pnpm install -g pnpm

thanks

@terwer
Copy link

terwer commented Jul 13, 2022

Run pnpm install -g then pnpm install -g pnpm

thanks very much!

@ZeroJsus
Copy link

has any one tell me, why should we run this commander?

@mydaoyuan
Copy link

Run pnpm install -g then pnpm install -g pnpm

run the command every time when I change registries.

每次修改源都需要运行命令

@lclancey
Copy link

has any one tell me, why should we run this commander?

Check ~/.local/share/pnpm/global/5/node_modules/modules.yaml
pnpm leaves a default registry config line in this file, indicate that all the global installed packages were from this registry (unless using --registry=xxx)
So when you change your default registry like pnpm config set -g registry=xxx , you have to re-config this by execute pnpm install -g to reset default registry, then install what you like.

@catnuko
Copy link

catnuko commented May 30, 2023

Run pnpm install -g then pnpm install -g pnpm

thanks

@ccreusat
Copy link

ccreusat commented Oct 1, 2023

Hi,
I have the same error :

This modules directory was created using the following registries configuration: {"@edifice-ui":"https://registry.npmjs.org/","default":"https://registry.npmjs.org/"}. The current configuration is {"default":"https://registry.npmjs.org/"}. To recreate the modules directory using the new settings, run "pnpm install -g".

but running pnpm install -g gives me another error ..

 ERR_PNPM_NO_PKG_MANIFEST  No package.json found in /Users/ccre/Library/pnpm/global/5

I want the registry to be registry=https://registry.npmjs.org/ for the current package I made.

pnpm config list gives me this :

//registry.npmjs.org/:_authToken=SECRET_TOKEN
access=public
auto-install-peers=true
registry=https://registry.npmjs.org/
user-agent=pnpm/8.7.0 npm/? node/v18.16.1 darwin arm64

Any help please ?

Thank you

@ccreusat
Copy link

ccreusat commented Oct 6, 2023

Hi, I have the same error :

This modules directory was created using the following registries configuration: {"@edifice-ui":"https://registry.npmjs.org/","default":"https://registry.npmjs.org/"}. The current configuration is {"default":"https://registry.npmjs.org/"}. To recreate the modules directory using the new settings, run "pnpm install -g".

but running pnpm install -g gives me another error ..

 ERR_PNPM_NO_PKG_MANIFEST  No package.json found in /Users/ccre/Library/pnpm/global/5

I want the registry to be registry=https://registry.npmjs.org/ for the current package I made.

pnpm config list gives me this :

//registry.npmjs.org/:_authToken=SECRET_TOKEN
access=public
auto-install-peers=true
registry=https://registry.npmjs.org/
user-agent=pnpm/8.7.0 npm/? node/v18.16.1 darwin arm64

Any help please ?

Thank you

It's fixed. I uninstalled and reinstalled completely pnpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests