contentful-labs / starter-gatsby-blog

Gatsby starter for a Contentful project from the community.
https://contentful.github.io/starter-gatsby-blog/
MIT License
195 stars 199 forks source link

adding defer: true in gatsby-node.js (DSG) throws Built Rendering Engines failed error #237

Open shameer-rahman opened 1 year ago

shameer-rahman commented 1 year ago

i'm trying to enable DSG option by adding defer: true but i'm getting Built Rendering Engines failed error, the build works fine when i set defer: false, below is the gatsby-node.js code

createPage({
        path: `/blog/${post.slug}/`,
        component: blogPost,
        context: {
          slug: post.slug,
          previousPostSlug,
          nextPostSlug,
        },
        defer: true
 })

below is the exact error message i'm getting

failed Validating Rendering Engines - 2.750s
 ERROR #98001  ENGINE.VALIDATION
Built Rendering Engines failed validation failed validation.
Please open an issue with a reproduction at https://gatsby.dev/new-issue for more help.
  Error: Worker exited before finishing task
  - index.js:205 ChildProcess.<anonymous>
    [contentful-starter-blog]/[gatsby-worker]/dist/index.js:205:41

here is my gatsby info

System: OS: macOS Binaries: Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm Browsers: Chrome: 105.0.5195.102 Safari: 16.0 npmPackages: gatsby: ^5.5.0 => 5.5.0 gatsby-plugin-image: ^3.5.0 => 3.5.0 gatsby-plugin-react-helmet: ^6.5.0 => 6.5.0 gatsby-plugin-sharp: ^5.5.0 => 5.5.0 gatsby-provision-contentful: ^0.0.5 => 0.0.5 gatsby-source-contentful: ^8.5.0 => 8.5.0 gatsby-transformer-sharp: ^5.5.0 => 5.5.0 npmGlobalPackages: gatsby-cli: 5.5.0