0

when I am running a .tsx file, I am getting this error

TypeError

Message dispatcher.useInsertionEffect is not a function

Stack Trace TypeError: dispatcher.useInsertionEffect is not a function at useInsertionEffect (webpack-internal:///../../node_modules/react/cjs/react.development.js:1639:21) at Insertion (webpack-internal:///../../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js:54:133) at renderWithHooks (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:14986:18) at mountIndeterminateComponent (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:17812:13) at beginWork (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:19050:16) at HTMLUnknownElement.callCallback (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:3946:14) at Object.invokeGuardedCallbackDev (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:3995:16) at invokeGuardedCallback (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:4057:31) at beginWork$1 (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:23960:7) at performUnitOfWork (webpack-internal:///../../node_modules/@hot-loader/react-dom-v17/cjs/react-dom.development.js:22775:12)

It was running fine but started giving trouble suddenly. Couldn't actually sort the issue. Any help would be highly appreciated.

1 Answers1

1

useInsertionEffect is a React 18 feature, and you probably are depending on a version older than that in your repository. We officially only support ^16.13.1 and ^17 though - you may want to check your dependencies so that you don't inadvertently pull in React 18 features.

Eldloppa
  • 91
  • 7