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
[v4] Bug: React 17, React is not defined after ejecting #9953
Comments
|
I guess that this issue should be moved to https://github.com/facebook/create-react-app |
|
This is not an issue about create-react-app. Thanks for replying quickly. |
|
I'm having this exact issue even without ejecting. I followed the migration guide, ran react-codemod, deleted node_modules. The compiler says the code compiled successfully but getting the red screen in the browser. |
ehsankhfr
mentioned this issue
|
Upgrade React 17 and remove the CRA ejection issue has been fixed in #9885 and needs to wait for the maintainer to publish a new version. :) |
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
|
use npm create-react-app my-app |
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
shelegdmitriy
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
I followed the steps here to reproduce the error. But everything works fine. This means the issue isn't with create-react-app |
snyk-bot
mentioned this issue
snyk-bot
mentioned this issue
|
Can't reproduce the error here either. Second that Steps to Reproduce, step 5 is done automatically. |


React version: 17.0.1
Steps To Reproduce
Link to code example: https://codesandbox.io/s/ecstatic-wood-ou6px
The current behavior
I upgraded react to 17 and removed "import React"s from my project files (except index.js where react mounted). But I got "ReferenceError: React is not defined" in those files.
To investigate the issue behind this, I created a new react app, the new JSX transformation was working. But when I eject, it throws the same errors.
So;
Without react-scripts, new JSX transformation doesn't working.
The expected behavior
Components should render without declaring React (import React from "react") if React is in scope.
The text was updated successfully, but these errors were encountered: