Next.js Discord

Discord Forum

Next 14.3 canary with React Compiler

Answered
American Curl posted this in #help-forum
Open in Discord
American CurlOP
I'm trying the new React Compiler with Next 14.3 canary. Without the babel-plugin-react-compiler babel plugin, things seem to work with React 19. But when I enable the compiler, I get the following errors (see attached): Cannot read properties of undefined (reading 'H')

I'm just using the default React TS app router project using create-next-app. Very good chance I did something wrong, so will attach images of my .babelrc and .eslintrc.json as well.

Anyone know how to fix this? Is the compiler compatible with the latest canary build?
Answered by American Curl
Ah looks like React updated their docs with the latest! There is a special configuration needed next.config.js. This wasn't published when I looked last night 🥳 https://react.dev/learn/react-compiler#usage-with-nextjs
View full answer

1 Reply

American CurlOP
Ah looks like React updated their docs with the latest! There is a special configuration needed next.config.js. This wasn't published when I looked last night 🥳 https://react.dev/learn/react-compiler#usage-with-nextjs
Answer