-
Notifications
You must be signed in to change notification settings - Fork 143
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]: 'TypeError: Cannot read property 'isBatchingLegacy' of undefined' when running npm run dev after creating a checkout-ui extension #1833
Comments
Hi @philkendallsimba, thanks for reporting this issue! Given that react-reconciler is in the stack trace, this seems to be a conflict because the CLI uses React 18, but the UI extension uses React 17. However, this should have been fixed in 3.45.1, as reported here. Here is the root-level {
"name": "fruitful-supply-app",
"version": "1.0.0",
"main": "web/index.js",
"license": "UNLICENSED",
"scripts": {
"shopify": "shopify",
"build": "shopify app build",
"dev": "shopify app dev",
"info": "shopify app info",
"generate": "shopify app generate",
"deploy": "shopify app deploy"
},
"dependencies": {
"@shopify/app": "3.45.1",
"@shopify/checkout-ui-extensions-react": "^0.24.0",
"@shopify/cli": "3.45.1",
"react": "^17.0.2"
},
"author": "amcaplan",
"overrides": {
"@types/react": "17.0.30"
}
} Are you able to share the |
Same error for me - I tried playing with versions of React to no avail |
Same for me - not working |
@lucidlive @manelephant can you let me know what OS/shell/Node you're using? And share your So far I haven't been able to reproduce. |
1 similar comment
@lucidlive @manelephant can you let me know what OS/shell/Node you're using? And share your So far I haven't been able to reproduce. |
Hi all, I've finally managed to reproduce locally. It looks like this is only an issue on older versions of Node and npm. If you're on Node 16+ and npm 8+ this doesn't seem to happen, because Since Node 14 has reached end-of-life and isn't receiving security fixes, I don't think we are likely to invest in a fix for this specific case. If it's important to you to continue using Node 14, I welcome you to investigate further and submit a patch. However, note that a near-future version of the CLI will drop support for Node 14, so it's recommended to upgrade. Has anyone experienced this with more recent versions of Node and npm? |
By the way, it seems the latest npm actually still supports Node 14. So maybe just try upgrading npm and see if that's sufficient for your purposes? And please let me know how it goes! |
I can confirm that once upgraded to node 18, I no longer have the issue. We didn't need to use node 14 for any specific reason, so am happy with upgrading. The Shopify CLI documentation at https://shopify.dev/docs/apps/tools/cli states a minimum node version of 14.17.0, so I would suggest the documentation gets updated. Thanks for investigating. |
same errror and I am suing node version 19 |
@tkejr same here have you had any luck? |
I am getting the same problem, I'm using node Here's a snippet of the dependencies in my package.json:
Update: Tried different node versions and got the same error:
|
In case anyone else encounters the same issue, here's the final libs in my package.json that made it work:
Also, I needed to downgrade to Node v18.20.5 for this to work. |
Please confirm that you have:
In which of these areas are you experiencing a problem?
Extension
Expected behavior
Extension preview should have worked.
Actual behavior
after running npm run dev, the following error occured:
TypeError: Cannot read property 'isBatchingLegacy' of undefined
at ensureRootIsScheduled (/home/phkendall/git/shopify-app-checkout-test/phil-test-2/node_modules/react-reconciler/cjs/react-reconciler.development.js:17731:35)
at scheduleUpdateOnFiber (/home/phkendall/git/shopify-app-checkout-test/phil-test-2/node_modules/react-reconciler/cjs/react-reconciler.development.js:17636:5)
at Object.updateContainer (/home/phkendall/git/shopify-app-checkout-test/phil-test-2/node_modules/react-reconciler/cjs/react-reconciler.development.js:21022:5)
at Ink.unmount (file:///home/phkendall/git/shopify-app-checkout-test/phil-test-2/node_modules/ink/build/ink.js:262:20)
at EventEmitter.emit (events.js:412:35)
at EventEmitter.emit (domain.js:475:12)
at emit (/home/phkendall/git/shopify-app-checkout-test/phil-test-2/node_modules/signal-exit/index.js:105:13)
at processEmit [as emit] (/home/phkendall/git/shopify-app-checkout-test/phil-test-2/node_modules/signal-exit/index.js:193:7)
Verbose output
Reproduction steps
Operating System
Windows 10: WSL2 using Ubuntu 20.04.5 LTS
Shopify CLI version (check your project's
package.json
if you're not sure)3.45.1
Shell
bash
Node version (run
node -v
if you're not sure)v14.21.3
What language and version are you using in your application?
Node 14.21.3
The text was updated successfully, but these errors were encountered: