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

[gatsby-remark-code-repls] Fix validation error saying default template isn't importing React #3974

Conversation

Swizec
Copy link
Contributor

@Swizec Swizec commented Feb 11, 2018

After a clean install of latest Gatsby I was getting this error

The page component at "node_modules/gatsby-remark-code-repls/default-redirect-template.js" didn't pass validation

You must import React at the top of the file for a React component to be valid

Add the following to the top of the component:

    import React from 'react'


The page component must export a React component for it to be valid

This PR fixes it.

I'm not sure if that signifies a deeper problem with whatever is doing the validation, but that's beyond my understanding. This was easier to get operational quick :)

@Swizec Swizec changed the title Fix validation error saying default template isn't importing React [gatsby-remark-code-repls] Fix validation error saying default template isn't importing React Feb 11, 2018
@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit 4c05c09

https://deploy-preview-3974--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

You must have caught the brief window when this bug was in existence yesterday :-)

I fixed it in #3949

Upgrade gatsby and you should be sorted! Thanks!

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

Successfully merging this pull request may close these issues.

3 participants