awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
916 stars 265 forks source link

[bug] installing aws-appsync errors when graphQL is a project dependency #719

Closed Mr0cket closed 1 year ago

Mr0cket commented 2 years ago

What is the current behavior? when I run npm i aws-appsync on a project where graphql is a dependency I recieve the following error on installing appsync:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: play@1.0.0
npm ERR! Found: graphql@14.7.0
npm ERR! node_modules/graphql
npm ERR!   graphql@"^14.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"0.13.0 | 14.x | 15.x" from aws-appsync@4.1.5
npm ERR! node_modules/aws-appsync
npm ERR!   aws-appsync@"*" 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.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. In empty directory:

  1. npm init -y
  2. npm i graphql@^14
  3. npm i aws-appsync

What is the expected behavior?

Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions? npm: v8.8.0 node v16 env: nodejs

ljharb commented 2 years ago

A single pipe is invalid in semver; it uses a double pipe.

ljharb commented 2 years ago

Duplicate of #699, i think

mattiLeBlanc commented 2 years ago

Correct, duplicate of #699 but still not resolved and it is blocking my work. I have to revert to a much older version. Can this be please looked at?

blazinaj commented 2 years ago

Bump. Really hoping this single line of code gets released soon :)

iartemiev commented 1 year ago

Sorry for the delay, the fix was released in version 4.1.7