[Gatsby] React is not defined
See original GitHub issueI was using react-facebook
v8.14.0 on my Gatsby site and updated to v.9.0.5 recently. After the update I tried to build my site again and I saw the following error message.
WebpackError: ReferenceError: React is not defined
Not sure how to fix the problem and would like to see if other people saw this message.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
React 17 new JSX Transform: ReferenceError: React is not ...
Gatsby 2.28.1 will throw a ReferenceError: React is not defined if React is not imported on top of the file, but the new...
Read more >Adding gatsby-plugin-typescript to GatsbyJS "React is not ...
I created the hello world GatsbyJS application and then added the typescript plugin and I immediately got the error "React is ...
Read more >Troubleshooting Common Errors - Gatsby
You may encounter an error like Error: ReferenceError: window is not defined that you didn't see in development if you reference browser globals...
Read more >Gatsby - the window is not defined error, what and how to fix it?
Gatsby is a React-based framework. If the problematic code is in the component's render function, move that code into a useEffect hook or...
Read more >Window Is Not Defined Error | ErraticGenerator.com
I used Gatsby version 4. How I solved it. I said earlier that I use react-p5-wrapper . Typically this is how I would...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m getting the same error in a Vite project.
Hi @seeden,
Just tried v9.0.7 and I still got the error message while building my Gatsby project.
Do you know how could I solve this problem? Thanks a lot