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

Updating to pnpm 9.x (from 8.12.1) and run pnpm i throws exception: Cannot read properties of undefined (reading 'missingPeersOfChildren') #8041

Closed
2 of 4 tasks
samueljseay opened this issue May 2, 2024 · 1 comment · Fixed by #8054 · May be fixed by #8046
Assignees

Comments

@samueljseay
Copy link

samueljseay commented May 2, 2024

Verify latest release

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

pnpm version

No response

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

https://github.com/woocommerce/woocommerce/tree/dev/update-pnpm-9

Reproduction steps

We are using syncpack to keep versions synchronized so i used it to move us from 8.12.1 of pnpm to latest (9.0.6)

After that installed latest pnpm: pnpm i -g pnpm@latest
Then run a pnpm i

Also just noting I tried deleting the existing lock file, I tried pnpm store prune as well, but the error remained.

Describe the Bug

After running pnpm i it does not finish, it stalls with a thrown exception:

pnpm: Cannot read properties of undefined (reading 'missingPeersOfChildren')
    at resolveDependency (/redacted/pnpm/global/5/.pnpm/pnpm@9.0.6/node_modules/pnpm/dist/pnpm.cjs:175581:86)
    at async resolveDependenciesOfDependency (/redacted/pnpm/global/5/.pnpm/pnpm@9.0.6/node_modules/pnpm/dist/pnpm.cjs:175169:39)
    at async Promise.all (index 0)
    at async resolveDependencies (/redacted/pnpm/global/5/.pnpm/pnpm@9.0.6/node_modules/pnpm/dist/pnpm.cjs:175051:8)
    at async resolveChildren (/redacted/pnpm/global/5/.pnpm/pnpm@9.0.6/node_modules/pnpm/dist/pnpm.cjs:175243:48)
    at async postponedResolution (/redacted/pnpm/global/5/.pnpm/pnpm@9.0.6/node_modules/pnpm/dist/pnpm.cjs:175206:51)
    at async Promise.all (index 0)
    at async /redacted/pnpm/global/5/.pnpm/pnpm@9.0.6/node_modules/pnpm/dist/pnpm.cjs:174986:33
    at async Promise.all (index 24)
    at async resolveDependenciesOfImporters (/redacted/pnpm/global/5/.pnpm/pnpm@9.0.6/node_modules/pnpm/dist/pnpm.cjs:174957:51)

Expected Behavior

It should not throw an error.

Which Node.js version are you using?

20.11.1

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)

No response

@zkochan
Copy link
Member

zkochan commented May 2, 2024

Remove the lockfile and node_modules, then run install with pnpm v9. Also, if your workspace doesn't use the workspace: protocol for referencing packages from the workspace, set link-workspace-packages=true in .npmrc.

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