bug: unique-enum-value-names throws "Duplicate "graphql" modules exception
See original GitHub issuegraphql-eslint
: v0.7.2
I checked the package-lock
, there’s only one version of graphql referenced: v15.5.0 (latest)
files: ['*.graphql'],
parser: '@graphql-eslint/eslint-plugin',
parserOptions: {
schema: './schema/**/*.graphql',
},
plugins: ['@graphql-eslint'],
rules: {
'@graphql-eslint/unique-enum-value-names': 'error',
},
/Users/daniel/graphql-schema/schema/StatementState.graphql
0:1 error Cannot use GraphQLEnumType "StatementState" 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 @graphql-eslint/unique-enum-value-names
I tried another graphql
validation rule. interestingly, e.g. rule @graphql-eslint/variables-are-input-types
works without an error.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Error: Duplicate "graphql" modules · Issue #211 - GitHub
If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed.
Read more >Duplicate "graphql" modules cannot be used - Stack Overflow
I encountered this error and resolved it using the following steps: list all available instances of graphql package to check for dependences.
Read more >graphql-eslint - Bountysource
ESLint parser, plugin and set rules for GraphQL (for schema and operations). ... bug: unique-enum-value-names throws "Duplicate "graphql" modules exception ...
Read more >ERROR: Duplicate "graphql" modules cannot be used at the ...
I'm trying to create a new code-first NextJS demo using the JSS initializer for experimental purposes only: enter image description here.
Read more >Duplicate GraphQL Error Out of Nowhere - Questions - Prisma 1
Duplicate “graphql” modules cannot be used at the same time since ▸ different ▸ versions may have different capabilities and behavior.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in
@graphql-eslint/eslint-plugin@0.8.0
I think I found the problem: graphql (parts of it) is being bundled with the package. I assume this is not intentional?
from: index.cjs.js