-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 "GRVSCStylesheet" #30199
Comments
Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it. If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look. Thanks for using Gatsby! 💜 |
I was running into this too and was able to reproduce this in a minimal test case in https://github.com/kremalicious/gatsby-test-case-30199 based on gatsby-starter-blog. Looks like the combination Gatsby v3 + gatsby-remark-vscode (which the error implies is at fault) + gatsby-source-graphql will lead to this error. Not sure which package needs fixing to prevent that, for time being also cross-posted on andrewbranch/gatsby-remark-vscode#144 |
I've also started running into this error after migrating to v3 (current version:
This error only occurs when running // gatsby-node.js
exports.createResolvers = ({
actions,
cache,
createNodeId,
createResolvers,
store,
reporter,
}) => {
const { createNode } = actions;
createResolvers({
craft_media_Asset: {
imageFile: {
type: `File`,
resolve(source, args, context, info) {
return createRemoteFileNode({
url: source.url,
store,
cache,
createNode,
createNodeId,
reporter,
});
},
},
},
});
}; Removing that code also removes the error. The snippet above is from the Gatsby docs here: https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization/#feeding-remote-images-into-gatsby-image This is the output of my
|
Thanks for the reproduction! I am definitely seeing the same error, so will investigate soon. |
I got also errors with code: exports.createResolvers = ({
actions,
cache,
createNodeId,
createResolvers,
store,
reporter,
}) => {
const { createNode } = actions;
const imageFileResolver = {
imageFile: {
type: `File`,
resolve(source) {
return createRemoteFileNode({
url: `${process.env.API_URL}${source.url}`,
store,
cache,
createNode,
createNodeId,
reporter,
});
},
},
};
createResolvers({
StrapiXXXX: imageFileResolver,
StrapiYYYY: imageFileResolver,
});
}; But it fails with files from Strapi admin panel:
EDIT: |
Description
Just migrated to Gatsby 3 (3.0.4) and getting the following error after every save in development mode. The error appears in the terminal and Gatsby gets stuck on 'building schema' without ever progressing.
Steps to reproduce
Run Gatsby in development mode, make a change to a file and save.
Expected result
Pages should be re-compiled with the reflected changes.
Actual result
Error message displayed as above.
Environment
System:
OS: macOS 11.2.3
CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.11.0 - /usr/local/bin/node
npm: 7.6.2 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 89.0.4389.82
Safari: 14.0.3
npmPackages:
gatsby: ^3.0.4 => 3.0.4
gatsby-plugin-feed: ^3.0.0 => 3.0.0
gatsby-plugin-image: ^1.0.1 => 1.0.1
gatsby-plugin-manifest: ^3.0.0 => 3.0.0
gatsby-plugin-offline: ^4.0.0 => 4.0.0
gatsby-plugin-react-helmet: ^4.0.0 => 4.0.0
gatsby-plugin-sharp: ^3.0.1 => 3.0.1
gatsby-plugin-sitemap: ^3.0.0 => 3.0.0
gatsby-remark-external-links: ^0.0.4 => 0.0.4
gatsby-remark-images: ^4.0.0 => 4.0.0
gatsby-remark-vscode: ^3.2.0 => 3.2.0
gatsby-source-filesystem: ^3.0.0 => 3.0.0
gatsby-source-graphql: ^3.0.0 => 3.0.0
gatsby-transformer-remark: ^3.0.0 => 3.0.0
gatsby-transformer-sharp: ^3.0.0 => 3.0.0
The text was updated successfully, but these errors were encountered: