Closed philkendallsimba closed 1 year ago
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 package.json
I have through following your steps above, which seems to work correctly:
{
"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 package.json
you get from following the repro steps, so we can see if anything looks different?
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 package.json
if you feel comfortable? That might help spot the pattern of where this appears.
So far I haven't been able to reproduce.
@lucidlive @manelephant can you let me know what OS/shell/Node you're using? And share your package.json
if you feel comfortable? That might help spot the pattern of where this appears.
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 @shopify/cli-kit
gets its own version of react-reconciler
and react
.
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!
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
@shopify/cli-kit
gets its own version ofreact-reconciler
andreact
.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?
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?
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