Error on mismatched minimal react version (#65806)
### What Error when users installing react@18 and requires higher version ### Why The architecture now already requires to have `react@beta` or `react@rc`. Especially where we need to load `react-server` condition of react, which is erroring now in react 18.
This commit is contained in:
parent
2ae4a4786a
commit
046acd504e
2 changed files with 4 additions and 2 deletions
|
@ -105,8 +105,8 @@ const NEXT_PROJECT_ROOT_DIST_CLIENT = path.join(
|
|||
'client'
|
||||
)
|
||||
|
||||
if (parseInt(React.version) < 18) {
|
||||
throw new Error('Next.js requires react >= 18.2.0 to be installed.')
|
||||
if (parseInt(React.version) < 19) {
|
||||
throw new Error('Next.js requires react >= 19.0.0 to be installed.')
|
||||
}
|
||||
|
||||
export const babelIncludeRegexes: RegExp[] = [
|
||||
|
|
|
@ -43,6 +43,8 @@ export function runTests(
|
|||
dependencies: {
|
||||
...packageJson.dependencies,
|
||||
...packageJson.devDependencies,
|
||||
react: '19.0.0-beta-04b058868c-20240508',
|
||||
'react-dom': '19.0.0-beta-04b058868c-20240508',
|
||||
},
|
||||
installCommand: ({ dependencies }) => {
|
||||
const pkgs = Object.keys(dependencies).reduce((prev, cur) => {
|
||||
|
|
Loading…
Reference in a new issue