Open psykzz opened 2 years ago
@psykzz That's a brilliant suggestion. We will address this ASAP. Thanks.
@psykzz We have fixed this issue with release of v3.1.2. Please check and confirm.
I think I'm having the same/a related issue with v4.0.1.
When I run npm start I get:
Missing onError handler for invocation 'building-schema', error was 'Error: Type with name "GatsbyImageLayout" does not exists'. Stacktrace was 'Error: Type with name "GatsbyImageLayout" does not exists
at SchemaComposer.get (C:\...\node_modules\graphql-compose\src\TypeStorage.ts:39:13)
at ThunkComposer._thunk (C:\...\node_modules\graphql-compose\src\TypeMapper.ts:737:34)
at ThunkComposer.get ofType [as ofType] (C:\...\node_modules\graphql-compose\src\ThunkComposer.ts:21:34)
at getTypeNode (C:\...\node_modules\graphql-compose\src\utils\definitionNode.ts:253:28)
at getTypeNode (C:\...\node_modules\graphql-compose\src\utils\definitionNode.ts:253:12)
at C:\...\node_modules\graphql-compose\src\utils\definitionNode.ts:286:20
at Array.map (<anonymous>)
at getArgumentsDefinitionNodes (C:\...\node_modules\graphql-compose\src\utils\definitionNode.ts:284:6)
at C:\...\node_modules\graphql-compose\src\utils\definitionNode.ts:320:20
at Array.map (<anonymous>)
at getFieldDefinitionNodes (C:\...\node_modules\graphql-compose\src\utils\definitionNode.ts:312:6)
at getObjectTypeDefinitionNode (C:\...\node_modules\graphql-compose\src\utils\definitionNode.ts:61:13)
at ObjectTypeComposer.getType (C:\...\node_modules\graphql-compose\src\ObjectTypeComposer.ts:986:57)
at getGraphQLType (C:\...\node_modules\graphql-compose\src\utils\typeHelpers.ts:308:17)
at C:\...\node_modules\graphql-compose\src\SchemaComposer.ts:227:47
at Array.forEach (<anonymous>)'
I added gatsby-plugin-image
to my dependencies and gatsby-config.js
and the error disappeared.
So I don't think the dependency has been properly removed yet?
@emilyfoxmusic Let me check and get back to you.
@emilyfoxmusic I just re-checked this with version 4.0.1 and 4.0.2. I did not encounter this issue. Can you please share more details in order to reproduce this?
Thanks
@vkalta ah interesting, thanks for checking. I will try and collect more info tomorrow when I'm back at my laptop then. I think I did also notice that in v4.0.1 gatsby-plugin-image was still listed as a peer dependency in the package lock? But I will check everything tomorrow and see if I can get some reproducible results, and dig a bit more in case it's related to another change I made. Much appreciated, thanks!
@vkalta I just gave this another look and I can confirm that when I remove gatsby-source-contentstack it will build correctly (albeit fail at runtime as would be expected!), so it does seem it it this package causing the issue? Also, I note that gatsby-plugin-image is definitely listed as a peer dependency - is that incorrect now?
What further information do you think would help to debug this? I could just add this package as a dependency, but I'd rather not if possible. I am on node v16.13.0, Gatsby v4.10.3 and this plugin is v4.0.1.
Let me know if you'd like me to open a separate issue.
@emilyfoxmusic Which OS are you using?
@vkalta Windows 10
Thanks @emilyfoxmusic. We are checking this issue on windows 10, and will get back to you asap.
With PR #123 (https://github.com/contentstack/gatsby-source-contentstack/pull/123/files#diff-6d7a97f0e776f3de4a5359346231cd4ce6b76c437f8a414cecf918f23dfe9e62R45-R49) there is a new requirement for users to install additional plugins, even if they were not using those features. This change was published as a patch version 3.1.1.
While i really appreciate the support to add these new features, having a patch upgrade fail builds and require new plugins feel bad.
Instead of a panic, could the feature just return the empty object. (Similar to if its not an asset originally).
Context error message