Why can't PNPM workspaces with multiple apps just use the dependencies they need?
Answered
Bighead carp posted this in #help-forum
Bighead carpOP
I have a pnpm workspace using turborepo. I have two apps in my
When I remove
appsfolder: apps/web and apps/chrome. apps/webdepends on React 19, while apps/chrome depends on React 18. It cannot be upgraded to react 19 for compatibility reasons.When I remove
apps/chrome, and move it elsewhere, and run pnpm install, everything works fine. If I put it back, then I get the following error in apps/web:Answered by Bighead carp
Created a nextjs github issue https://github.com/vercel/next.js/issues/75560
7 Replies
Bighead carpOP
Just to clarify everything works fine if I have only
apps/web in the monorepo. As soon as I add the files back in for app/chrome, it breaks the dependencies for app/web.Why cant the two apps just use the dependencies defined in their package.jsons? Why are they influencing each other at all???
Bighead carpOP
Here's a video of what I'm experiencing, and here's a tiny repro zip file
Bighead carpOP
Funnily enough the repro.zip builds fine both times on mac
Bighead carpOP
bump
Bighead carpOP
Created a nextjs github issue https://github.com/vercel/next.js/issues/75560
Answer