Why can't PNPM workspaces with multiple apps just use the dependencies they need?
Answered
Southern rough shrimp posted this in #help-forum
Southern rough shrimpOP
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 Southern rough shrimp
Created a nextjs github issue https://github.com/vercel/next.js/issues/75560
7 Replies
Southern rough shrimpOP
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???
Southern rough shrimpOP
Here's a video of what I'm experiencing, and here's a tiny repro zip file
Southern rough shrimpOP
Funnily enough the repro.zip builds fine both times on mac
Southern rough shrimpOP
bump
Southern rough shrimpOP
Created a nextjs github issue https://github.com/vercel/next.js/issues/75560
Answer