-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Fails to create new app. #4437
Comments
In step 2 you are creating project please write this command |
My bad. I was in fact running
|
Try upgrading node, then npm uninstall - g create-react-app and then use npx like |
If still not working then try this |
I tried that and got this:
|
Try |
Surprisingly, that did work. But why? Something is definitely not right if the documented command is not working and this convoluted approach does. |
It looks like your yarn installation is broken in some way. If you have yarn installed it will be used by default, which is what happened with the first command. The second command explicitly uses npm instead of yarn. |
So, how do you install |
Yarn is automatically used if it's present on your system. So the first set of commands you tried as well as |
I do not find |
My bad. I thought it was in the user guide. It is in the help for the create-react-app command: |
I don't think I'm the person to try to explain this. It was a bit over my head and convoluted. |
Closing this as it seems resolved, but a re-install or an upgrade of your Yarn installation should fix this for the future (or uninstall it if you don't use it). |
Why is this a Yarn only package? That wasn't clear in the documentation, and it is available on NPM to install. Yet you need Yarn for it to work? I'd prefer a normal npm package like everything else I use. If it doesn't work with NPM, then you should take it off NPM so no confusion. Is there an alternative to this that doesn't require Yarn??? |
This is not a Yarn only package. If you remove Yarn from your system, npm will be used by default. If you want to keep Yarn installed on your system but not update it, you'll have to use a special command as posted above: |
Thanks for the update. Actually, I never had Yarn installed on my system. But it didn't work with just NPM. |
Is this a bug report?
Yes
Did you try recovering your dependencies?
(Write your answer here.)
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
$: npx create-react-app --info
npx: installed 67 in 5.917s
Steps to Reproduce
(Write your steps here:)
Expected Behavior
(Write what you thought would happen.)
Actual Behavior
When I create a new React app, it creates the folder and a partial package.json file as illustrated below:
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered: