Bshr Ramadan
04/14/2022, 5:17 AMUnhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: Cannot use GraphQLNonNull \"Boolean!\" 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.","reason":"Error: Cannot use GraphQLNonNull \"Boolean!\" 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.","promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: Cannot use GraphQLNonNull \"Boolean!\" from another module or realm.","","Ensure that there is only one instance of \"graphql\" in the node_modules","directory. If different versions of \"graphql\" are the dependencies of other","relied on modules, use \"resolutions\" to ensure only one version is installed.","","<https://yarnpkg.com/en/docs/selective-version-resolutions>","","Duplicate \"graphql\" modules cannot be used at the same time since different","versions may have different capabilities and behavior. The data from one","version used in the function from another could produce confusing and","spurious results.
I tried to use yarn resolutions like this:
"resolutions": {
"graphql": "15.5.1"
}
But It didn't solve the problem.
I have monorepo, and I tried to unify versions of many related dependencies between repos
did anyone faced this?Bshr Ramadan
04/14/2022, 5:22 AM{
"dependencies": {
"@apollo/gateway": "^0.42.0",
"apollo-server-env": "^4.0.3",
"apollo-server-lambda": "^2.23.0",
"aws4": "^1.11.0",
"cordova-common": "^1.0.0",
"graphql": "^15.5.1",
"graphql-scalars": "^1.9.0",
"make-fetch-happen": "^8.0.14",
"ramda": "^0.27.1"
},
"devDependencies": {
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-like": "^1.1.1",
"chai-spies": "^1.0.0",
"chai-subset": "^1.6.0",
"chai-things": "^0.2.0",
"eslint": "^7.23.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.22.1",
"mocha": "^8.3.2"
},
"resolutions": {
"graphql": "15.5.1"
}
}
Derek Kershner
04/14/2022, 1:57 PMDerek Kershner
04/14/2022, 1:58 PMBshr Ramadan
04/14/2022, 4:19 PMDerek Kershner
04/14/2022, 4:21 PMDerek Kershner
04/14/2022, 4:22 PMthdxr
04/14/2022, 4:24 PMthdxr
04/14/2022, 4:24 PMthdxr
04/14/2022, 4:24 PMDerek Kershner
04/14/2022, 4:26 PMDerek Kershner
04/14/2022, 4:26 PMBshr Ramadan
04/14/2022, 5:07 PMthdxr
04/14/2022, 5:11 PMBshr Ramadan
04/14/2022, 5:12 PMDerek Kershner
04/14/2022, 5:26 PMcjs
, and make the others graphql-tools and esm
Bshr Ramadan
04/14/2022, 8:02 PMDerek Kershner
04/14/2022, 8:04 PMDerek Kershner
04/14/2022, 8:05 PMthdxr
04/14/2022, 8:28 PMthdxr
04/14/2022, 8:29 PM