Jacob Hayes
08/27/2021, 1:43 PMserverless-bundle
and aws-appsync
using a different version of graphql in their dependencies and causing the following error?:
"errorMessage": "Cannot use n \"__Schema\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\n<https://yarnpkg.com/en/docs/selective-version-resolutions>\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results."
This only started happening when I added serverless-bundle
to leverage yarn/lerna workspaces. All my services work correctly outside of the couple that are using the aws-appsync
libs which appear to be using a really old graphql version (0.13.0) whereas serverless-bundle
is using version 15.5.1Jacob Hayes
08/27/2021, 1:45 PMFrank
Jacob Hayes
08/27/2021, 4:06 PMJay
yarn
?Jacob Hayes
08/27/2021, 6:14 PMJay
Jacob Hayes
08/30/2021, 11:50 AM"resolutions": {
"graphql": "15.5.1"
},