Next.js Discord

Discord Forum

Nextjs in an NX monorepo.

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
Hey folks, i'm having an issue whereby i have a react native and a nextjs app in a mono repo. Both need different versions of react to run. I've installed the correct version of react in each of the apps workspace but the react native app needs it's version to be installed in the root node_modules.

When i try and build my nextjs app it uses react 19 and it attempts to build the app with react 18 from the root node_modules and break because features are not available etc.

Is there a way to force the nextjs build command to look in the local node_modules for react?

Thanks

0 Replies