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

Can't upgrade pnpm due to ERR_PNPM_UNEXPECTED_VIRTUAL_STORE #8061

Open
2 of 4 tasks
knoborsh opened this issue May 7, 2024 · 1 comment
Open
2 of 4 tasks

Can't upgrade pnpm due to ERR_PNPM_UNEXPECTED_VIRTUAL_STORE #8061

knoborsh opened this issue May 7, 2024 · 1 comment

Comments

@knoborsh
Copy link

knoborsh commented May 7, 2024

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

9.0.3

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI, Store

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

Run pnpm add -g pnpm .

Describe the Bug

Running pnpm add told me to upgrade pnpm (I've lost the specific message by now).

Running pnpm add -g pnpm as directed yields:

 ERR_PNPM_UNEXPECTED_VIRTUAL_STORE  Unexpected virtual store location

The dependencies at "/var/home/virgil/.local/share/pnpm/global/5/node_modules" are currently symlinked from the virtual store directory at "/var/home/virgil/.local/share/pnpm/global/5/.pnpm".

pnpm now wants to use the virtual store at "/home/virgil/.local/share/pnpm/global/5/.pnpm" to link dependencies from the store.

If you want to use the new virtual store location, reinstall your dependencies with "pnpm install".

You may change the virtual store location by changing the value of the virtual-store-dir config.

Running pnpm install as directed does not affect the issue. I can't tell from the information provided how to resolve the issue.

The issue may be related to /home being a symlink on my system.

Expected Behavior

The suggested upgrade command should have succeeded.

Which Node.js version are you using?

20.12.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

Fedora

@knoborsh
Copy link
Author

Running pnpm config set virtual-store-dir with either the old or new store directory does not resolve the issue so the last line of the message seems unhelpful.

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

1 participant