Next.js: Doesn't work with React 16

Created on 12 Jun 2017  路  9Comments  路  Source: vercel/next.js

Running on latest master, manually specified react and react-dom ^16.0.x, I get the following error:

ERROR  Failed to compile with 1 errors                                                                                                                                   10:24:43 PM

This module was not found:

* react-dom/lib/ReactReconciler in ./~/next/dist/client/next-dev.js

To install it, you can run: npm install --save react-dom/lib/ReactReconciler
> Ready on http://localhost:3000

Most helpful comment

I believe this issue should not be marked as closed, now that React 16.0.0 is out.

All 9 comments

We haven't tested yet with React 16 and we'll do it when they have a public beta or a RC.

Latest alphas of React 16 now support error boundaries: https://github.com/facebook/react/issues/2461#issuecomment-311077975

Meanwhile, if you don't care about the error handling and want to test Fiber, you can just comment out

https://github.com/zeit/next.js/blob/62a624775333f8abb4ecdd6896267f2a9b07b25e/client/next-dev.js#L2

and

https://github.com/zeit/next.js/blob/62a624775333f8abb4ecdd6896267f2a9b07b25e/client/next-dev.js#L40-L51

Alternatively you can try the fork https://github.com/msand/next.js/tree/fiber from my pull request https://github.com/zeit/next.js/pull/2570

Beta 2 is out, and next is throwing an error about the Reconciler when trying to use React 16

EDIT: Looks like this is already being discussed on https://github.com/zeit/next.js/issues/1098

I believe this issue should not be marked as closed, now that React 16.0.0 is out.

Was this page helpful?
0 / 5 - 0 ratings