gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.29k stars 10.31k forks source link

Error:Must provide Source. Received #11139

Closed marvinjude closed 5 years ago

marvinjude commented 5 years ago

Description

$ gatsby develop
success open and validate gatsby-configs — 0.031 s
success load plugins — 0.940 s
success onPreInit — 8.311 s
success delete html and css files from previous builds — 0.199 s
info One or more of your plugins have changed since the last time you ran Gatsby. As
a precaution, we're deleting your site's cache to ensure there's not any stale
data
success initialize cache — 0.162 s
success copy gatsby files — 1.209 s
success onPreBootstrap — 0.019 s
success source and transform nodes — 3.673 s
success building schema — 4.174 s
posts { errors:
   [ TypeError: Must provide Source. Received:
           {
             allButterPost {
               edges {
                 node {
                   id
                   seo_title
                   slug
                   categories {
                     name
                     slug
                   }
                   author {
                     first_name
                     last_name
                     email
                     slug
                     profile_image
                   }
                   body
                 }
               }
             }
           }

         at parse (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\graphql\language\parser.js:35:11)
         at graphqlImpl (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\graphql\graphql.js:100:34)
         at C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\graphql\graphql.js:66:223
         at Promise._execute (C:\Users\Marvins pc\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\bluebird\js\release\debuggability.js:313:9)
         at Promise._resolveFromExecutor (C:\Users\Marvins pc\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\bluebird\js\release\promise.js:483:18)
         at new Promise (C:\Users\Marvins pc\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\bluebird\js\release\promise.js:79:10)
         at graphql (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\graphql\graphql.js:63:10)
         at graphqlRunner (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\gatsby\dist\bootstrap\index.js:372:14)
         at Object.exports.createPages (C:\Users\Marvins pc\Desktop\g-starter-buttercms\gatsby-node.js:13:26)
         at runAPI (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\gatsby\dist\utils\api-runner-node.js:154:37)
         at resolve (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\gatsby\dist\utils\api-runner-node.js:258:19)
         at Promise._execute (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\debuggability.js:313:9)
         at Promise._resolveFromExecutor (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\promise.js:483:18)
         at new Promise (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\promise.js:79:10)
         at Promise.mapSeries.plugin (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\gatsby\dist\utils\api-runner-node.js:257:16)
         at tryCatcher (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\util.js:16:23)
         at Object.gotValue (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\reduce.js:155:18)
         at Object.gotAccum (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\reduce.js:144:25)
         at Object.tryCatcher (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\util.js:16:23)
         at Promise._settlePromiseFromHandler (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\promise.js:512:31)
         at Promise._settlePromise (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\promise.js:569:18)
         at Promise._settlePromise0 (C:\Users\Marvins pc\Desktop\g-starter-buttercms\node_modules\bluebird\js\release\promise.js:614:10) ] }
error gatsby-node.js returned an error

Steps to reproduce

coreyward commented 5 years ago

Hi @marvinjude, without more information (as requested in the issue template) there's no action that can be taken on this. Can you confirm you still need something or better outline the issue you're reporting?

sidharthachatterjee commented 5 years ago

@marvinjude On first glance, it appears as if config for https://www.gatsbyjs.org/packages/gatsby-source-buttercms/ is incorrect

Like @coreyward mentioned, a reproduction or instructions on how to reproduce this (like the issue template) would be useful!

marvinjude commented 5 years ago

Fixed!

It was an error with API calls.

Thanks.