question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

file system routing: Incorrect output type string

See original GitHub issue

Description

“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:closed
  • Created 3 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
czabajcommented, Nov 2, 2020

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

"resolutions": {
	"graphql": "14.6.0",
},
2reactions
moonmeistercommented, Oct 14, 2020

Not stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Structure of routes | Routing system - Drupal
The simplest way to define routes is to create a my_module_name.routing.yml file (see the introductory example). Each route is defined as a ...
Read more >
Working with the Cisco IOS File System, Configuration Files ...
This appendix describes how to manipulate the Cisco ME 3800X and ME 3600X switch flash file system, how to copy configuration files, and...
Read more >
Message Routing - Spring
When using @Router to annotate a method, the method may return either a MessageChannel or a String type. In the latter case, the...
Read more >
Routing in ASP.NET Core - Microsoft Learn
Routing is responsible for matching incoming HTTP requests and dispatching those requests to the app's executable endpoints.
Read more >
Rewrites - next.config.js
Note: rewrites in beforeFiles do not check the filesystem/dynamic routes immediately ... key : String - the key from the selected type to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found