Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
roland-reed opened this issue Jun 5, 2020 · 10 comments

Comments

@roland-reed
Copy link

Bug Report

Describe the bug

ERROR #11328

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

undefined

This error is thrown when I'm trying the Gatsby Remark VSCode with Docz

To Reproduce

Following the guide will lead to the problem:

curl https://codeload.github.com/doczjs/docz/tar.gz/master | tar -xz --strip=2 docz-master/examples/with-gatsby-remark-vscode
mv with-gatsby-remark-vscode docz-with-gatsby-remark-vscode-example
cd docz-with-gatsby-remark-vscode-example
npm run build

Expected behavior

No error

Environment

  • docz version: 2.3.1
  • OS: Ubuntu 20.04
  • Node/npm version: Node 12.17.0 npm 6.14.4

Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
image

@roland-reed
Copy link
Author

I found that this may caused by the update of gatsby, when I use yarn's resolutions to set gatsby@2.22.15, this error no longer exists.

@juliantroeps
Copy link

Same Issue. @roland-reed's workaround worked fine.

@Pixelatedza
Copy link

Also started getting this issue. Yarn resolution fixed it for me as well.

@nguyenletan
Copy link

nguyenletan commented Jun 6, 2020

same issue. I think the root cause of this issue is mdx v2 of gatsbyjs.

@raphaelcunha
Copy link

same issue. I agree with @nguyenletan.

@nguyenletan
Copy link

same issue. I agree with @nguyenletan.

Upgrade gatsby to latest version will slove it.

@roland-reed
Copy link
Author

I have to reopen this issue, same problem in gatsby@2.23.18.

@dheysonalves
Copy link

@roland-reed You closed the issue, what did you do to solve it?

@roland-reed
Copy link
Author

@roland-reed You closed the issue, what did you do to solve it?
docz has fixed this, so no extra step is required.

@Dakojr
Copy link

Dakojr commented Oct 13, 2020

i Have the same Error

System:
OS: macOS 10.15.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v12.18.2/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v12.18.2/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 86.0.4240.75
Firefox: 79.0
Safari: 13.1.2
npmPackages:
gatsby: 2.24.75 => 2.24.75
gatsby-cli: ^2.12.107 => 2.12.107
gatsby-plugin-create-client-paths: ~2.3.13 => 2.3.13
gatsby-plugin-offline: ^3.2.31 => 3.2.31
gatsby-plugin-react-helmet: ~3.3.14 => 3.3.14
gatsby-plugin-root-import: ~2.0.5 => 2.0.5
gatsby-plugin-sass: ~2.3.16 => 2.3.16
gatsby-plugin-static-folders: ~1.0.1 => 1.0.1
gatsby-plugin-web-font-loader: ~1.0.4 => 1.0.4
npmGlobalPackages:
gatsby-cli: 2.12.107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants