-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Schema must contain uniquely named types but contains multiple types named "RemarkHeadingLevels". #299
Comments
Same here. |
I also encountered this issue on running |
I had the same problem earlier today. I removed |
nope - same thing here... swapping npw with yarn didn't help |
I'm stuck with this too |
I haven't run into this on Windows 10 using PowerShell or CMD - Can someone provide additional details so it's easier to look into this?
Thanks! |
@TerabyteTiger I am getting this error on Mac. I also tagged you in a DescriptionGridsome v0.7.19
Initializing plugins...
Load sources - 0s
Error: Schema must contain uniquely named types but contains multiple types named "Mutation".
at typeMapReducer (project/node_modules/.pnpm/[email protected]/node_modules/graphql/type/schema.js:262:13)
at Array.reduce (<anonymous>)
at new GraphQLSchema (project/node_modules/.pnpm/[email protected]/node_modules/graphql/type/schema.js:145:28)
at SchemaComposer.buildSchema (project/node_modules/.pnpm/[email protected][email protected]/node_modules/graphql-compose/lib/SchemaComposer.js:153:12)
at Schema.buildSchema (project/node_modules/.pnpm/[email protected]/node_modules/gridsome/lib/app/Schema.js:35:35)
at Plugins.createSchema (project/node_modules/.pnpm/[email protected]/node_modules/gridsome/lib/app/Plugins.js:94:22)
at processTicksAndRejections (internal/process/task_queues.js:97:5) Steps to reproduceIn module.exports = {
plugins: [
{
use: 'gridsome-source-graphql',
options: {
url: 'http://localhost:8888/graphql',
fieldName: 'gqlFieldName',
typeName: 'gqlTypeName',
},
},
],
}
Expected resultGridsome should consume the GraphQL properly and load the app Actual resultGridsome throws the error above and exits, does not start app Environment
|
Thanks for the very detailed reponse @stereokai! To possibly help narrow it down further, does this occur when using |
I wasn't aware of |
@TerabyteTiger I cleared my npm cache, completely erased node_modules, and ran Now I'm getting this: Gridsome v0.7.19
Initializing plugins...
Load sources - 0s
Error: Cannot use GraphQLList "[gqlTypeName_Log]" 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 (project/node_modules/gridsome/node_modules/graphql/jsutils/instanceOf.js:28:13)
at isListType (project/node_modules/gridsome/node_modules/graphql/type/definition.js:181:34)
at isWrappingType (project/node_modules/gridsome/node_modules/graphql/type/definition.js:364:10)
at getNamedType (project/node_modules/gridsome/node_modules/graphql/type/definition.js:423:12)
at typeMapReducer (project/node_modules/gridsome/node_modules/graphql/type/schema.js:257:48)
at typeMapReducer (project/node_modules/gridsome/node_modules/graphql/type/schema.js:286:20)
at typeMapReducer (project/node_modules/gridsome/node_modules/graphql/type/schema.js:286:20)
at Array.reduce (<anonymous>)
at new GraphQLSchema (project/node_modules/gridsome/node_modules/graphql/type/schema.js:145:28)
at NamespaceUnderFieldTransform.transformSchema (project/node_modules/@gridsome/source-graphql/transforms.js:57:12)
at project/node_modules/graphql-tools/dist/transforms/transforms.js:11:54
at Array.reduce (<anonymous>)
at Object.applySchemaTransforms (project/node_modules/graphql-tools/dist/transforms/transforms.js:10:23)
at transformSchema (project/node_modules/graphql-tools/dist/transforms/transformSchema.js:17:27)
at GraphQLSource.namespaceSchema (project/node_modules/@gridsome/source-graphql/index.js:72:12)
at project/node_modules/@gridsome/source-graphql/index.js:50:43 This is my {
"name": "project",
"private": true,
"scripts": {
"build": "gridsome build",
"develop": "gridsome develop",
"explore": "gridsome explore"
},
"dependencies": {
"@gridsome/source-graphql": "~0.1.0",
"gridsome": "^0.7.0"
}
}
|
That seems super weird - does this happen to be a public repo? |
It's a brand new project I just started yesterday, all the project has is just this configuration |
This is super weird. I have both packages working without issue - Windows 10, PowerShell. I started with the These were my files -
|
Thanks a lot of all of this!!! I tried both options. Using your settings, I'm now getting this: Initializing plugins...
Load sources - 0s
Error: Cannot use GraphQLObjectType "RAM_Character" 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. |
Has anybody been able to figure this out? I'm using AWS Amplify (AppSync GraphQL) with Gridsome and i'm getting the same issue. I would really appreciate any help here. |
I encountered this error during running newly fetch projects.
OS: Ubuntu 18.04
The text was updated successfully, but these errors were encountered: