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

Getting this error: Uncaught TypeError: dispatcher.useInsertionEffect is not a function #3107

Open
SaiTeja-Tal opened this issue Sep 14, 2023 · 6 comments

Comments

@SaiTeja-Tal
Copy link

SaiTeja-Tal commented Sep 14, 2023

From today morning, we suddenly ran into this issue and couldn't run any of our applications. Can someone please look into this?

image

Uncaught TypeError: dispatcher.useInsertionEffect is not a function
at useInsertionEffect (react.development.js:1639:21)
at useInsertionEffectMaybe (emotion-styled-base.browser.esm.js:51:3)
at Insertion (emotion-styled-base.browser.esm.js:61:15)
at renderWithHooks (react-dom.development.js:14985:18)
at mountIndeterminateComponent (react-dom.development.js:17811:13)
at beginWork (react-dom.development.js:19049:16)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:16)
at invokeGuardedCallback (react-dom.development.js:4056:31)
at beginWork$1 (react-dom.development.js:23959:7)

The above error occurred in the component:

at Insertion (webpack://operations-portal-ui/./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js?:57:20)
at eval (webpack://operations-portal-ui/./node_modules/@emotion/react/dist/emotion-element-cbed451f.browser.esm.js?:57:66)
at Box (webpack://operations-portal-ui/./node_modules/@mui/material/node_modules/@mui/system/esm/createBox.js?:37:72)
at App (webpack://operations-portal-ui/./src/containers/App/index.tsx?:58:74)
at ThemeProvider (webpack://operations-portal-ui/./node_modules/@mui/material/node_modules/@mui/system/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js?:42:5)
at ThemeProvider (webpack://operations-portal-ui/./node_modules/@mui/material/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js?:54:5)
at Router (webpack://operations-portal-ui/./node_modules/react-router/index.js?:206:15)
at BrowserRouter (webpack://operations-portal-ui/./node_modules/react-router-dom/index.js?:116:5)
at QueryClientProvider (webpack://operations-portal-ui/./node_modules/react-query/es/react/QueryClientProvider.js?:39:21)
at Provider (webpack://operations-portal-ui/./node_modules/react-redux/es/components/Provider.js?:16:20)
at RootApp
@Andarist
Copy link
Member

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given.

@Mahboobeh-sayadiyan
Copy link

Mahboobeh-sayadiyan commented Sep 14, 2023

same issue after upgrading Nodejs to version 18
"@emotion/babel-plugin": "^11.11.0",
"@emotion/babel-preset-css-prop": "^11.11.0",
"@emotion/core": "^11.0.0",
"@emotion/react": "^11.10.8",
"@emotion/styled": "^11.10.8",
"react": "^17.0.2",
"react-dom": "^17.0.2",

Screen Shot 2023-09-14 at 1 58 02 PM

@Andarist
Copy link
Member

I honestly can't give a different answer than before. Please create a runnable repro case to make it possible for me to dive straight into the problem.

@paulohlvs
Copy link

Boa tarde! Teria alguma solução de imediato para este erro, estou com aplicação em produção e após ultimo commit no dia 15/09 ocorreu o mesmo problema, estou utilizando react 17 e não posso atualizar para react 18 devido outras bibliotecas. segue bibliotecas e versões sendo utilizada no projeto.

"@emotion/react": "11.10.0",
"@emotion/styled": "11.10.0",
"@mui/icons-material": "5.10.6",
"@mui/material": "5.10.1",
"@mui/styles": "5.10.7",
"react": "17.0.1",
"react-dom": "17.0.1",

image

@RaunaqPurohitCredila
Copy link

Hi , I too faced same issue as above mentioned. Same issue and also couldn't upgrade React version.
I could fix it by forcefully upgrade React to v18 by installing it by npm install react@18.2.0 --force.
Hope this works!!

@khomyakov42
Copy link

I can fix this issue, when remove alias for react-dom from webpack.conf.js

                alias: {
                    "react-dom": "@hot-loader/react-dom",
                },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants