Closed ConnorIngold closed 1 year ago
Hi @ConnorIngold . Thank for rising up this issue!. It seems that there is a bug as the cli-kit
module has been upgraded to use Reacy 18. We’ll have to revisit that part of the graph to make React not a peer dependency
There is a workaround fixing the version using resolutions
https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/
node_modules
, package-lock.json
and pnpm-lock.yaml
generated in previous dependencies installation (the ones that applies to your package manage setup)package.json
{
"resolutions": {
"react": "18.2.0"
}
}
yarn install
and once it finishes yarn shopify app generate extension
againPlease let me know if this works for you. Anyway, we are working on a fix for this problem. Sorry for the inconveniences.
Hi @alvaro-shopify, No luck I'm afraid, but I am using NPM over Yarn, so that might have something to do with. Is 100% neccary to use yarn here? I would prefer not too but the requests from merchants for this work are coming in and I need to get to grips with it, 😅
Regardless thank you and I've pushed it up to a public repo: https://github.com/ConnorIngold/shopify-checkout-extention-test
Hi @ConnorIngold. Sorry, I didn't notice that you were using npm
. Could you run the command generate
using the --fore
parameter like this?
npm run shopify app generate extension --force
it should do the same effect as using resolutions
with yarn
Hi @ConnorIngold. Sorry, I didn't notice that you were using
npm
. Could you run the commandgenerate
using the--fore
parameter like this?npm run shopify app generate extension --force
it should do the same effect as using
resolutions
with yarn
I got this error today too - is running this command with --force safe?
Hi @ConnorIngold. Sorry, I didn't notice that you were using
npm
. Could you run the commandgenerate
using the--fore
parameter like this?npm run shopify app generate extension --force
it should do the same effect as using
resolutions
with yarn
@alvaro-shopify This worked for me, thank you!
I got this error today too - is running this command with --force safe?
It should be, it's forcing to use the last React version which is mandatory for the last version of the CLI UI Kit.
Hi everyone, we released 3.45.1
which resolves this issue.
A quick post-mortem: when you generate a UI extension, the CLI runs this command for you: npm install react@17.0.0 @shopify/admin-ui-extensions-react@1.1.0
. It turns out that npm is not able to figure out that @shopify/admin-ui-extensions-react
peer-depends on the same react
package, so the fix that we implemented is to run the commands separately:
npm install react@17.0.0
npm install @shopify/admin-ui-extensions-react@1.1.0
yarn
and pnpm
instead are able to figure out the relationship between the packages, so no changes were necessary.
This is still occurring for POS UI Extensions
on 3.45.1, any advice? the --force workaround works for now.
I tried looking for the related PR but it doesn't seem linked to this issue.
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
TypeError: Cannot read properties of undefined (reading 'isBatchingLegacy') at ensureRootIsScheduled (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:17731:35) at scheduleUpdateOnFiber (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:17636:5) at Object.updateContainer (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:21022:5) at Ink.render (file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/build/ink.js:226:20) at render (file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/build/render.js:19:14) at renderString (file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/@shopify/cli-kit/dist/private/node/ui.js:39:22) at renderOnce (file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/@shopify/cli-kit/dist/private/node/ui.js:7:33) at renderFatalError (file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/@shopify/cli-kit/dist/public/node/ui.js:207:12) at handler (file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/@shopify/cli-kit/dist/public/node/error.js:113:5) at file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/@shopify/cli-kit/dist/public/node/error-handler.js:27:20 /Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:17731 if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) { ^
TypeError: Cannot read properties of undefined (reading 'isBatchingLegacy')
at ensureRootIsScheduled (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:17731:35)
at scheduleUpdateOnFiber (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:17636:5)
at Object.updateContainer (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:21022:5)
at Ink.unmount (file:///Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/ink/build/ink.js:284:20)
at EventEmitter.emit (node:events:524:35)
at EventEmitter.emit (node:domain:489:12)
at emit (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/signal-exit/index.js:105:13)
at process.processEmit [as emit] (/Users/tanmay/Desktop/Apps/Shopify-App-Edit-Order/node_modules/signal-exit/index.js:193:7)
at process.exit (node:internal/process/per_thread:209:15)
at process.
Node.js v19.5.0
I get this error when I update my cli :(
Problem still exists: npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @shopify/ui-extensions-react@2023.7.2 npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! peer react@"18.2.0" from @shopify/app@3.49.5 npm ERR! node_modules/@shopify/app npm ERR! @shopify/app@"^3.0.0" from the root project npm ERR! react@"18.2.0" from @shopify/cli-kit@3.49.5 npm ERR! node_modules/@shopify/cli-kit npm ERR! @shopify/cli-kit@"3.49.5" from @shopify/app@3.49.5 npm ERR! node_modules/@shopify/app npm ERR! @shopify/app@"^3.0.0" from the root project npm ERR! @shopify/cli-kit@"3.49.5" from @shopify/cli@3.49.5 npm ERR! node_modules/@shopify/cli npm ERR! @shopify/cli@"^3.0.0" from the root project npm ERR! 2 more (@shopify/plugin-cloudflare, @shopify/plugin-did-you-mean) npm ERR! 2 more (ink, react-reconciler) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@">=17.0.0 <18.0.0" from @shopify/ui-extensions-react@2023.7.2 npm ERR! node_modules/@shopify/ui-extensions-react npm ERR! @shopify/ui-extensions-react@"2023.7.2" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@17.0.2 npm ERR! node_modules/react npm ERR! peer react@">=17.0.0 <18.0.0" from @shopify/ui-extensions-react@2023.7.2 npm ERR! node_modules/@shopify/ui-extensions-react npm ERR! @shopify/ui-extensions-react@"2023.7.2" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Please confirm that you have:
In which of these areas are you experiencing a problem?
Extension
Expected behavior
I expected it to generate the extension with all it's files.
Actual behavior
I got an external error:
Verbose output
Reproduction steps
npm init @shopify/app@latest cd your-app npm run shopify app generate extension
Operating System
Windows 11
Shopify CLI version (check your project's
package.json
if you're not sure)3.45.0
Shell
bash
Node version (run
node -v
if you're not sure)v18.12.1
What language and version are you using in your application?
Node