profile
viewpoint

Ask questionsgatsby build error #11328 A page component must export a React component for it to be valid. Please make sure this file exports a React component: /Users/tiagosanchez/Documents/Projects/personalBlog/node_modules/gatsby-plugin-offline/app-shell.js

Description

I run gatsby build on CLI for my blog (I am using gatsby-theme-blog and you can find it in the following link, the repo for my blog.

This was done following your tutorial link to prepare your site to be publish. The fist time I did it, it did run well, however after running the audit with Lighthouse and going through adding manifest and all the other good stuff, it is not working.

I have the following error on my console

ERROR #11328

A page component must export a React component for it to be valid. Please make sure this file exports a React component:

/Users/tiagosanchez/Documents/Projects/personalBlog/node_modules/gatsby-plugin-offline/app-shell.js

If I go a couple of commits back (cf09d3e986c4b01efc0941d5192c7fd47d4be24e) to this one I am able to run gatsby build.

After further testing I notice that gatsby-plugin-offlineis the cause of the issue, not sure why that is the case.

Could you please point me in the right direction?

gatsbyjs/gatsby

Answer questions dkthehuman

Running npm upgrade fixed it for me, too. Thanks @davidbailey00!

useful!

Related questions

Error: Cannot create as TypeComposer the following value: Date. hot 3
Importing Link from gatsby breaks Storybook hot 2
Loading chunks while a new release is deployed hot 2
Webpack error #98123 when running "gatsby develop" hot 2
[gatsby-telemetry] error: src/postinstall.js not found in Linux environments hot 2
IE11: Object not valid as React Child hot 2
CircleCI build Error: spawn ENOMEM hot 2
[Help] I somehow managed to butcher my site's performance hot 2
Build gets stuck at Generating image thumbnails / Update schema on large sites hot 2
[gatsby-source-graphql] Shopify GraphQL Schema Error hot 2
UNHANDLED REJECTION Source and destination must not be the same. hot 2
gatsby-source-shopify unable to complete build hot 2
Gatsby's Use Of Polyfills and the 'Missing Resources for x' error hot 2
Autoprefixer "browsers" option is deprecated in v9, produces warnings hot 2
'gatsby' is not recognized as an internal or external command hot 2
Github User Rank List