[v12.1.0] Using React 18 prevents starting without experimental
in config (TypeError: Cannot set properties of undefined (setting 'reactRoot'))
#34499
Labels
bug
Issue was opened via the bug report template.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Starting with
v12.1.0
, you can't use React 18 when you don't use theexperimental
field in thenext.config.js
That's because this recent change sets
reactRoot
on the user's config without checking if the key already exists:next.js/packages/next/server/config.ts
Lines 679 to 682 in 787186a
Expected Behavior
experimental
field in thenext.config.js
or
To Reproduce
npx create-next-app@latest --ts --use-npm .
npm install next@latest react@rc react-dom@rc
npm run dev
The text was updated successfully, but these errors were encountered: