Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
88 stars 9 forks source link

Update 'app-bridge-react' react dependency to v17 #83

Closed TheSecurityDev closed 2 years ago

TheSecurityDev commented 2 years ago

Describe the feature you’d like

If I specify React version ^17.0.0 in the package.json, then when trying to update or install some packages I get this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! node_modules/@shopify/app-bridge-react
npm ERR!   @shopify/app-bridge-react@"^2.0.5" 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.
npm ERR!

I am able to get it working using --legacy-peer-deps, but when I try to deploy to Heroku it won't build there.

When I switch my react version back to v16 I get a bunch of warnings from other packages, so I want to update.

Maybe I'm misunderstanding where the issue is coming from, but that's what it looks like to me.

TheSecurityDev commented 2 years ago

I had to downgrade to npm v6 to fix the issues if it helps anyone else.

charlesdobson commented 2 years ago

The react peer dependency range in app-bridge-react has now been extended to include both v16 and v17. Please update to the latest app-bridge-react version (2.0.16 at the time of this writing) if you'd like to use React v17.