interface
interface copied to clipboard
Error: Cannot use GraphQLScalarType "BigDecimal" from another module or realm.
Bug Description
yarn prestart
yarn run v1.22.5
$ yarn graphql:generate && yarn prei18n:extract
$ graphql-codegen --config codegen.yml
√ Parse configuration
> Generate outputs
> Generate ./src/state/data/generated.ts
√ Load GraphQL schemas
√ Load GraphQL documents
× Generate
→ spurious results.
Found 1 error
× ./src/state/data/generated.ts
Error: Cannot use GraphQLScalarType "BigDecimal" 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.
at instanceOf (D:\docs\repos\uniswap\node_modules\graphql\jsutils\instanceOf.js:35:13)
at isScalarType (D:\docs\repos\uniswap\node_modules\graphql\type\definition.js:109:34)
at printType (D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:126:36)
at D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:59:12
at Array.map (<anonymous>)
at printFilteredSchema (D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:58:13)
at Object.printSchema (D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:40:10)
at transformSchemaAST (D:\docs\repos\uniswap\node_modules\@graphql-codegen\typescript\index.cjs.js:327:35)
at Object.plugin (D:\docs\repos\uniswap\node_modules\@graphql-codegen\typescript\index.cjs.js:345:38)
at executePlugin (D:\Docs\repos\uniswap\node_modules\@graphql-codegen\core\index.cjs.js:38:35)
Error: Cannot use GraphQLScalarType "BigDecimal" 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.
at instanceOf (D:\docs\repos\uniswap\node_modules\graphql\jsutils\instanceOf.js:35:13)
at isScalarType (D:\docs\repos\uniswap\node_modules\graphql\type\definition.js:109:34)
at printType (D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:126:36)
at D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:59:12
at Array.map (<anonymous>)
at printFilteredSchema (D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:58:13)
at Object.printSchema (D:\docs\repos\uniswap\node_modules\graphql\utilities\printSchema.js:40:10)
at transformSchemaAST (D:\docs\repos\uniswap\node_modules\@graphql-codegen\typescript\index.cjs.js:327:35)
at Object.plugin (D:\docs\repos\uniswap\node_modules\@graphql-codegen\typescript\index.cjs.js:345:38)
at executePlugin (D:\Docs\repos\uniswap\node_modules\@graphql-codegen\core\index.cjs.js:38:35)
Something went wrong
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Steps to Reproduce
- yarn
- yarn prestart
Expected Behavior GraphQL Code Generator should complete successfully.
Additional Context even adding graphql resolutions won't fix this in yarn.
There are no bootstrap docs in the readme. its more like an about page.