file system routing: Incorrect output type string
See original GitHub issueDescription
“build-schema” throws an error complaining about the output type of “WpPost.gatsbyPath”.
success source and transform nodes - 6.842s
⠦ building schema
ERROR
Missing onError handler for invocation 'building-schema', error was 'Error: WpPost.gatsbyPath provided incorrect OutputType: 'String''. Stacktrace was 'Error: WpPost.gatsbyPath provided incorrect OutputType: 'String' tring'
at TypeMapper.convertOutputFieldConfig (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\TypeMapper.js:294:15)
at resolveOutputConfigAsThunk (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\configAsThunk.js:19:41)
at ObjectTypeComposer.getFieldConfig (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\ObjectTypeComposer.js:300:58)
at C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:44:19
at Array.forEach (<anonymous>)
at toInputObjectType (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:38:14)
at convertInputObjectField (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:78:19)
at C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:45:23
at Array.forEach (<anonymous>)
at toInputObjectType (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:38:14)
at convertInputObjectField (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:78:19)
at C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:45:23
at Array.forEach (<anonymous>)
at toInputObjectType (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:38:14)
at convertInputObjectField (C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:78:19)
at C:\Users\Alex\code\moonmeister\moonmeister.net\node_modules\gatsby\node_modules\graphql-compose\lib\utils\toInputObjectType.js:45:23'
⠏ building schema
Steps to reproduce
https://github.com/moonmeister/moonmeister.net/tree/refactor/unified-routes
Expected result
Should build pages using the URI from the WordPress source plugin
Actual result
Throws this error. I’ve tried using slug, and title as well. all to the same affect. I’ve used file-system routing on 2 other sites with no troubles…so this confuses me.
Environment
System: OS: Windows 10 10.0.19042 CPU: (8) x64 Intel® Core™ i7-8550U CPU @ 1.80GHz Binaries: Node: 12.18.3 - ~\AppData\Local\Temp\yarn–1599212003520-0.293080228882421\node.CMD Yarn: 1.22.5 - ~\AppData\Local\Temp\yarn–1599212003520-0.293080228882421\yarn.CMD npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD Languages: Python: 3.8.5 Browsers: Chrome: 85.0.4183.83 Edge: Spartan (44.19041.423.0), Chromium (85.0.564.44) npmPackages: gatsby: ^2.24.53 => 2.24.53 gatsby-image: ^2.4.16 => 2.4.16 gatsby-plugin-feed: ^2.5.11 => 2.5.11 gatsby-plugin-goatcounter: ^0.4.0 => 0.4.0 gatsby-plugin-linaria: ^2.1.0 => 2.1.0 gatsby-plugin-manifest: ^2.4.27 => 2.4.27 gatsby-plugin-netlify: ^2.3.13 => 2.3.13 gatsby-plugin-offline: ^3.2.26 => 3.2.26 gatsby-plugin-postcss: ^2.3.11 => 2.3.11 gatsby-plugin-preact: ^4.0.10 => 4.0.10 gatsby-plugin-react-helmet: ^3.3.10 => 3.3.10 gatsby-plugin-readingtime: ^1.0.1 => 1.0.1 gatsby-plugin-robots-txt: ^1.5.1 => 1.5.1 gatsby-plugin-sharp: ^2.6.31 => 2.6.31 gatsby-plugin-sitemap: ^2.4.12 => 2.4.12 gatsby-plugin-webpack-bundle-analyzer: ^1.0.5 => 1.0.5 gatsby-plugin-webpack-size: ^1.0.0 => 1.0.0 gatsby-source-filesystem: ^2.3.27 => 2.3.27 gatsby-source-wordpress-experimental: ^1.3.8 => 1.3.8 gatsby-transformer-sharp: ^2.5.14 => 2.5.14 npmGlobalPackages: gatsby-cli: 2.12.59
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (8 by maintainers)
Top GitHub Comments
I’ve encountered similar problems in the past. I think it is caused by different versions of
graphql
package where inappropriate is resolved for usage.If you are using Yarn, try this resolution
Not stale.