React 17.0.2/ 18.2.0 error on Cloning an existing APP repository

Hello all,

I tried creating a shopify app… using the following command:

npm init @Shopify_77 /app@latest

which gave me an and a ‘package.json’ file which looked like this:



“dependencies”: {
@shopify/app”: “3.45.0”,
@shopify/cli”: “3.45.0”

I then did:
-npm run dev
which did it’s job and I could see the app in my shopify admin and use it

I then created an extension for the app like so:
-npm run shopify app generate extension

The act of generating an extension has done the following to the package.json file:




“dependencies”: {
@shopify/app”: “3.45.0”,
@shopify/checkout-ui-extensions-react”: “^0.25.0”,
@shopify/cli”: “3.45.0”,
@shopify/shopify_function”: “^0.0.3”,
“javy”: “^0.1.0”,
“react”: “^17.0.2”
},

After doing npm run typegen in the appropriate folder, I can see my extension working in the checkout.

And it all works fine.

But after pushing the code to my GIT repository, and then cloning it onto another machine…

I run npm install in the

Which results in the following error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: test-app@1.0.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@“^17.0.2” from the root project
npm ERR! react@“18.2.0” from @Shopify_77 /cli-kit@3.45.0
npm ERR! node_modules/@shopify/cli-kit
npm ERR! @Shopify_77 /cli-kit@“3.45.0” from @Shopify_77 /app@3.45.0
npm ERR! node_modules/@shopify/app
npm ERR! @Shopify_77 /app@“3.45.0” from the root project
npm ERR! @Shopify_77 /cli-kit@“3.45.0” from @Shopify_77 /cli@3.45.0
npm ERR! node_modules/@shopify/cli
npm ERR! @Shopify_77 /cli@“3.45.0” from the root project
npm ERR! 3 more (@shopify/plugin-cloudflare, …)
npm ERR! 2 more (ink, react-reconciler)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! @Shopify_77 /checkout-ui-extensions-react@“^0.25.0” 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_77 /checkout-ui-extensions-react@0.25.1
npm ERR! node_modules/@shopify/checkout-ui-extensions-react
npm ERR! @Shopify_77 /checkout-ui-extensions-react@“^0.25.0” 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

How can I get an existing app repository cloned on to another machine and initialise the code within it to get working?

Am I missing a command, or am I running the wrong command?