-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Create-react-app stuck on v4.0.3, cannot create a new app #11754
Comments
run
|
Dang it's that simple huh. Thanks, that worked like a charm! Is there something I can do on my end to set default behavior of |
Sadly not that I know of |
I faced the exact same issue today - fixed it by running Followed by: let me know if it helps. |
Thank you. That worked! |
Make sure you don't have |
FYI you don't need to have |
That's the problem. |
Agree, but if you use the method I listed above, npx does not default back to broken behavior. So @mryechkin might be right in saying that: it is not needed to install "create-react-app" globally. however I found this to be the only way to "clear" the faulty behavior. |
During set-up I got the following error:
|
Actually |
so, the solution seems to be found here. Tested it on my machine, and it worked. I didn't know that npx had its own cache. |
I also ran into this issue today. I ran all above workarounds such as:
I am running nvm version 0.39.0, node version v16.13.1, npm version 8.3.0, and npx version 8.3.0 if that helps at all. I did however have success with running the Best! |
@NathanMartinez A dumb question: did you try to clear npm cache and do a reboot in addition to the other tries? |
@Runejm Very good question actually. I did try clearing out the cache with a few commands I was able to find poking around. I also did try terminating my terminal sessions, however, I didn't think to do a reboot. I will definitely try that out tonight! If it does resolve the issue I'll be sure to post it here as well. Thank you for the insight! |
When creating a fresh CRA app, it prints:
Would be nice if the message included that you probably need to run |
Seem related to #11772 |
When running this command, I got |
Just fix the issue by running |
@chuchude That is the problem. You should not need to install it globally. Using |
Yes, I did try the |
Tried it after uninstalling the global install of create-react-app using First run:
Second run:
Pretty sure that's not how it's supposed to be! |
J |
Describe the bug
When attempting to use
npx create-react-app <app-name>
, I get the following error:What I have tried to fix it:
npm uninstall -g create-react-app
to uninstall any global versions of create-react-appnpm i -g npm@latest
to update npmnpm uninstall -g create-react-app && sudo npm cache clean -f
to try and clean any cached information regardingcreate-react-app
.Below is a gif showing the issue in real time.
Which terms did you search for in User Guide?
Latest release
Environment
Unfortunately, the
npx create-react-app info
command ends up with the same error.I am currently on Mac v12.0.1. Please request more info if needed.
Steps to reproduce
npx create-react-app <app-name-here>
Expected behavior
A React app is created.
Actual behavior
create-react-app
errors due to incorrect version.The text was updated successfully, but these errors were encountered: