pnpm / pnpm

Fast, disk space efficient package manager
https://pnpm.io
MIT License
29.32k stars 986 forks source link

pnpm v9 multiple react instances #8014

Open tvatoyan opened 5 months ago

tvatoyan commented 5 months ago

Verify latest release

pnpm version

9.0.6

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

No response

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

No response

Reproduction steps

Describe the Bug

We have nx react application, after updating pnpm version to latest we have issue with multiple react instances, pnpm serve works without any issues but after browser reload we have multiple issues on console for ex.

Expected Behavior

There should not be any react issues on console.

Which Node.js version are you using?

18.17.1

Which operating systems have you used?

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

No response

raketeFlo commented 4 months ago

@tvatoyan same here: did you find a solution or did you rollback to pnpm@8 ?

alex-enchi commented 4 months ago

Hi all https://pnpm.io/package_json#dependenciesmetainjected

That worked beautifully for my case.

zkochan commented 4 months ago

We can help if you provide a sample repository that reproduces the issue.

itsjavi commented 6 days ago

I have same problem with latest Next.js 14.2.13. I am using a dependency that declares react and react-dom as peer dependencies, and I have auto-install-peers=false on my .npmrc, but that same error keeps popping up (Cannot read properties of null (reading 'useCallback')). My pnpm version is 9.10.0