diff --git a/examples/with-eslint/package.json b/examples/with-eslint/package.json index e9eab360f8b63..a2977eecec192 100644 --- a/examples/with-eslint/package.json +++ b/examples/with-eslint/package.json @@ -8,8 +8,8 @@ }, "dependencies": { "next": "latest", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "devDependencies": { "eslint": "^7.24.0", diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 7e2bee5fad391..dd2aeec334866 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -10,7 +10,7 @@ "@mdx-js/react": "^1.6.18", "@next/mdx": "^9.1.1", "next": "latest", - "react": "^17.0.2", - "react-dom": "^17.0.2" + "react": "^18.2.0", + "react-dom": "^18.2.0" } } diff --git a/examples/with-next-sass/package.json b/examples/with-next-sass/package.json index 3a5972bfdcb25..f488a52f871ca 100644 --- a/examples/with-next-sass/package.json +++ b/examples/with-next-sass/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "next": "latest", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", "sass": "1.26.3" } } diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index f69e72299c5db..f29c22203b2d7 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -574,7 +574,7 @@ export default async function getBaseWebpackConfig( // Only error in first one compiler (client) once if (isClient) { if (!hasReactRoot) { - throw new Error('Next.js requires React 18 to be installed.') + throw new Error('Next.js requires React 18.2.0 to be installed.') } }