Next.js: learnnextjs.com installs react 16 and fails to compile

Created on 26 Sep 2017  路  7Comments  路  Source: vercel/next.js

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Steps at https://learnnextjs.com/basics/getting-started/setup should succeed compilation and show 404 in the browser.

Current Behavior

ERROR Failed to compile with 1 errors

15:19:19

This module was not found:

  • react-dom/lib/ReactReconciler in ./node_modules/next/dist/client/next-dev.js

To install it, you can run: npm install --save react-dom/lib/ReactReconciler
(node:78867) DeprecationWarning: Module.chunks: Use Module.forEachChunk/mapChunks/getNumberOfChunks/isInChunk/addChunk/removeChunk instead

Ready on http://localhost:3000

Steps to Reproduce

Steps are at https://learnnextjs.com/basics/getting-started/setup

Context

This is my initial discovery of nextjs and my first exploration of the learning resources.

Your Environment


| Tech | Version |
|---------|---------|
| next | 3.2.2 |
| node | 8.1.2 |
| OS | macOS 10.12.6 |
| browser | Chrome 61 |
| nvm | 0.32.1 |

Most helpful comment

npm i --save [email protected] worked for me.

All 7 comments

For any beginners trying to get past this, simply replace the npm install command with the following:

npm install --save react@15 react-dom@15 next

@JasonRitchie I've updated the readme, next.js v4 beta will be released soon by @rauchg. 馃憤

npm i --save [email protected] worked for me.

This should be closed I suppose as next v4 is out of beta for a long time.

馃憤

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings