Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: [React 19] Cannot read properties of undefined (reading 'ReactCurrentBatchConfig' #32766

Open
gdezpd opened this issue Mar 27, 2025 · 0 comments
Labels

Comments

@gdezpd
Copy link

gdezpd commented Mar 27, 2025

Image

When switching to 19 react, such an error occurred, below all deps
"dependencies": {
"@backoffice/components": "^4.10.2",
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.11.16",
"@mui/lab": "^5.0.0-alpha.127",
"@mui/material": "^5.12.1",
"@mui/x-date-pickers": "5.0.15",
"@reduxjs/toolkit": "1.9.7",
"@sentry/browser": "^7.118.0",
"@types/react-router-dom": "^5.3.3",
"centrifuge": "^3.1.1",
"circular-dependency-plugin": "^5.2.2",
"connected-react-router": "^6.9.3",
"core-js": "3.36.1",
"currency-symbol-map": "^5.1.0",
"date-fns": "2.30.0",
"date-fns-tz": "^2.0.1",
"dayjs": "^1.11.12",
"document-register-element": "1.14.10",
"eslint-plugin-simple-import-sort": "^12.1.1",
"export-to-csv": "^0.2.2",
"file-saver": "^2.0.5",
"history": "^5.3.0",
"immutable": "4.3.7",
"ip-address": "^10.0.1",
"isikukood": "^2.0.1",
"jwt-decode": "3.1.2",
"material-ui-popup-state": "^5.1.2",
"moment-timezone": "^0.5.45",
"nx": "20.6.4",
"react": "^19.0.0",
"react-beautiful-dnd": "13.1.1",
"react-custom-scrollbars-2": "^4.5.0",
"react-datepicker": "^8.2.1",
"react-device-detect": "^2.2.3",
"react-diff-components": "^0.0.4",
"react-dom": "^19.0.0",
"react-dropzone": "^14.2.3",
"react-html-parser": "^2.0.2",
"react-json-prettify": "^0.2.0",
"react-live-clock": "6.1.22",
"react-moment": "1.1.3",
"react-redux": "9",
"react-router-dom": "6.26.0",
"react-table": "^7.8.0",
"redux": "5.0.0",
"redux-logger": "^3.0.6",
"redux-observable": "2.0.0",
"redux-thunk": "2.4.2",
"regenerator-runtime": "^0.14.1",
"rxjs": "6.6.7",
"semantic-ui-css": "^2.5.0",
"semantic-ui-react": "^3.0.0-beta.2",
"validator": "^13.12.0",
"x-query-string": "^2.1.0",
"xml-formatter": "^3.6.3"
},
"devDependencies": {
"@babel/preset-env": "7.24.7",
"@babel/preset-react": "7.24.7",
"@babel/preset-typescript": "7.24.7",
"@mmisty/cypress-allure-adapter": "^3.2.2",
"@nrwl/eslint-plugin-nx": "19.8.9",
"@nx/cypress": "20.6.4",
"@nx/eslint": "20.6.4",
"@nx/jest": "20.6.4",
"@nx/js": "20.6.4",
"@nx/react": "20.6.4",
"@nx/rollup": "20.6.4",
"@nx/webpack": "20.6.4",
"@nx/workspace": "20.6.4",
"@nxplatform/cypress-shared": "4.67.0",
"@svgr/webpack": "6.5.1",
"@testing-library/jest-dom": "^6.1.6",
"@testing-library/react": "^16.2.0",
"@types/dateformat": "^5.0.0",
"@types/jest": "29.5.14",
"@types/jwt-simple": "^0.5.33",
"@types/node": "20.14.10",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react-redux": "^7.1.25",
"@types/react-slick": "0.23.13",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"babel-jest": "29.7.0",
"css-loader": "^6.11.0",
"cypress": "13.17.0",
"cypress-fail-fast": "^7.1.1",
"cypress-localstorage-commands": "^2.2.6",
"cypress-split": "1.24.0",
"dateformat": "^5.0.3",
"dotenv": "16.4.5",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-cypress": "2.15.2",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "7.34.3",
"eslint-plugin-react-hooks": "5.0.0",
"file-loader": "^6.2.0",
"http-server": "^14.1.1",
"husky": "^9.1.5",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jwt-simple": "^0.5.6",
"license-checker": "^25.0.1",
"lint-staged": "^15.2.9",
"nx-cloud": "19.1.0",
"prettier": "3.3.2",
"sass": "^1.77.8",
"sass-loader": "16.0.5",
"style-loader": "^3.3.4",
"stylus": "^0.63.0",
"stylus-loader": "^7.1.3",
"ts-jest": "29.2.2",
"ts-node": "^10.9.2",
"typescript": "5.0.4"
},
"resolutions": {
"coa": "2.0.2",
"@yarnpkg/parsers": "3.0.0-rc.18"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"eslint --fix --quiet"
]
}

if I run the command yarn list --pattern react

yarn list v1.22.22
warning Resolution field "@yarnpkg/[email protected]" is incompatible with requested version "@yarnpkg/[email protected]"
warning Resolution field "@yarnpkg/[email protected]" is incompatible with requested version "@yarnpkg/[email protected]"
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @emotion/[email protected]
├─ @floating-ui/[email protected]
├─ @floating-ui/[email protected]
├─ @fluentui/[email protected]
├─ @module-federation/[email protected]
├─ @module-federation/[email protected]
│ └─ @module-federation/[email protected]
├─ @module-federation/[email protected]
│ └─ @module-federation/[email protected]
├─ @mui/[email protected]
│ └─ [email protected]
├─ @mui/[email protected]
│ └─ [email protected]
├─ @nx/[email protected]
│ ├─ @babel/[email protected]
│ └─ @svgr/[email protected]
├─ @semantic-ui-react/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
│ └─ @babel/[email protected]
├─ @testing-library/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
│ └─ [email protected]
├─ [email protected]
│ ├─ [email protected]
│ └─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
└─ [email protected]

you can see that you have several dependencies that use a version of react-is that is incompatible with React 19. Here is a list of such dependencies:
[email protected] is used in the following packages:

[email protected]

[email protected]

[email protected] is used in the package:

[email protected]

but if I just delete these packages the error remains

@gdezpd gdezpd changed the title [React 19] Cannot read properties of undefined (reading 'ReactCurrentBatchConfig' Bug: [React 19] Cannot read properties of undefined (reading 'ReactCurrentBatchConfig' Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant