Gatsby: Error: Incorrect Output type

Created on 29 Jul 2020  路  7Comments  路  Source: gatsbyjs/gatsby

I have just started getting this error in the command line when I run gatsby develop:

/Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/TypeMapper.js:294 throw new Error(${typeName}.${fieldName} provided incorrect OutputType: '${(0, _misc.inspect)(composeType)}');
^
Error: GatsbyPlugin.options provided incorrect OutputType: 'JSONObject'
at TypeMapper.convertOutputFieldConfig (/Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/TypeMapper.js:294:15)
at resolveOutputConfigAsThunk (/Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/utils/configAsThunk.js:19:41)
at ObjectTypeComposer.getFieldConfig (/Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/ObjectTypeComposer.js:300:58)
at /Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/utils/toInputObjectType.js:44:19
at Array.forEach (<anonymous>)
at toInputObjectType (/Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/utils/toInputObjectType.js:38:14)
at ObjectTypeComposer.getInputTypeComposer (/Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/ObjectTypeComposer.js:600:84)
at ObjectTypeComposer.getInputType (/Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/ObjectTypeComposer.js:586:17)
at /Users/usrname/.config/yarn/global/node_modules/gatsby-recipes/dist/create-types.js:86:71
at Array.map (<anonymous>)

Everything seems to work fine on the app, just getting the above error thrown.
Seems to be a global issue; I have three apps, all throwing same error on running gatsby develop, and all apps seem to be working fine.
The gatsby versions in the apps are 2.23.12, 2.23.15 and 2.23.22.
Gatsby CLI is version: 2.12.67.

recipes bug

Most helpful comment

@insanity54 Already using yarn. Also upgraded to gatsby 2.24.5 and gatsby cli 2.12.93.
Issue is still there, but the application works fine.

All 7 comments

also getting this error!

Btw I started getting this after I updated from "gatsby": "^2.23.3" to "gatsby": "^2.24.1" in order to address the StaticQuery problems on deploy, as per https://github.com/gatsbyjs/gatsby/issues/25985.

I was seeing this error until I ran yarn install. I had previously installed dependencies with npm install.

@insanity54 Already using yarn. Also upgraded to gatsby 2.24.5 and gatsby cli 2.12.93.
Issue is still there, but the application works fine.

Still having this issue!

/Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/TypeMapper.js:294
        throw new Error(`${typeName}.${fieldName} provided incorrect OutputType: '${(0, _misc.inspect)(composeType)}'`);
        ^

Error: GatsbyPlugin.options provided incorrect OutputType: 'JSONObject'
    at TypeMapper.convertOutputFieldConfig (/Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/TypeMapper.js:294:15)
    at resolveOutputConfigAsThunk (/Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/utils/configAsThunk.js:19:41)
    at ObjectTypeComposer.getFieldConfig (/Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/ObjectTypeComposer.js:300:58)
    at /Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/utils/toInputObjectType.js:44:19
    at Array.forEach (<anonymous>)
    at toInput
ObjectType (/Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/utils/toInputObjectType.js:38:14)
    at ObjectTypeComposer.getInputTypeComposer (/Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/ObjectTypeComposer.js:600:84)
    at ObjectTypeComposer.getInputType (/Users/username/.config/yarn/global/node_modules/gatsby-recipes/node_modules/graphql-compose/lib/ObjectTypeComposer.js:586:17)
    at /Users/username/.config/yarn/global/node_modules/gatsby-recipes/dist/graphql-server/server.js:20899:101
    at Array.map (<anonymous>)

Yes, likewise. Doesn't seem to affect anything, so I've been ignoring it. But issue is still there

I could fix it by reinstalling node and then installing gatsby-cli with npm install -g instead of yarn global add. Would have preferred to use yarn though...

Was this page helpful?
0 / 5 - 0 ratings