-
-
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
Aborting installation. npm install --save --save-exact react react-dom react-scripts has failed. #1735
Comments
Can you post a complete console output? |
This diagnostic code is now in npm install -g create-react-app@latest |
Creating a new React app in /home/project-penguin. Installing packages. This might take a couple minutes. npm WARN deprecated [email protected]: 💥 preset-latest accomplishes the same task as babel-preset-env. 🙏 Please install it with 'npm install babel-preset-env --save-dev'. '{ "presets": ["latest"] }' to '{ "presets": ["env"] }'. For more info, please check the docs: http://babeljs.io/docs/plugins/preset-env 👌. And let us know how you're liking Babel at @babeljs on 🐦 |
Which OS are you using? Note to self: we should probably salvage npm log instead of nuking the directory. We should just make sure it's possible to create app with the same name again, but npm log should stay so people can attach it to bug reports. |
I can only replicate it on Ubuntu 16.04, my other stacks using 14.04 seem ok. |
This looks like an npm bug so I recommend trying different npm versions. |
Had same issue on a basic Digital Ocean server. Creating some swap space seems to fix the issue. See: |
@ripplesphere Can you post the whole output of the command when it fails? It would be helpful so we can figure out how to better explain the problem in the CLI itself. I don't think #1735 (comment) shows the complete output. |
@gaearon Sorry. I fixed the problem and closed the terminal. The 'create-react-app hello-world' command would run for a while and then be "killed". It would happen at different locations in the process, which is why I suspected a resource issue. |
Thanks. I guess there’s nothing actionable in this issue then. |
@gaearon Is it worth it to find the cause of memory issue? Seems that it's alienating for people with low resources. Or we should add a minimum memory requirements in the read me. I have also experienced create-react-app killed because of the memory while working in c9. Since then, I'm working locally for create-react-app. |
We can't make npm consume less memory. I don't see a solution here. |
hmm, in my case it's killed while running the devServer. It's happening a long time a go. Will open another issue when I can make a reproducible case. |
Yes, but that's not what this particular issue was about (it was about npm). |
Thanks for the link, yeah I think we can add this npm (or any memory related ) issue in the read me. |
I had exactly the same issue ! Before:
After:
This is a really dirty hack, but it worked fine. |
Can you post the error message you got? It’s cool that you caught the error but it would be more useful to know what error it was so that we can fix it 😄 |
My bad :-) I was so glad to finally be able to create a React App I didn't go further. |
Oh I see. In this case this should have been printed. We should keep the logs in such cases. It might have worked for you but it's still unsafe (e.g. likely to produce broken installs). |
Yes, that's why I said it is a "really dirty" hack. In fact, I tested the I wouldn't advise to implement my workaround, but it may be useful if someone is brave enough to try it manually :-) |
Restart my computer, it works~ try ~ |
In my case, it was
|
I had this issue and spent a long while trying to fix it, this is what worked for me. uninstalling and then reinstalling yarn. Then all worked fine, hope that helps someone |
same, ubuntu 16.04, node -v 7.10 |
If you have this issue it means npm is failing. Look at the log and hopefully you'll see why this happens. If not please raise a new issue with more information. |
for me fixed by running sudo chown -R $(whoami) "$HOME/.npm", after first making sure that upgraded to the latest stable version of npm (npm -g install npm). |
Updating node and npm fixed the issue for me @rhalfi 👍 |
This solved my problem. Seems the lower end Digital Ocean droplets don't have the required RAM to bring up the installation |
@ripplesphere @petardfoozer That link seems to be dead, but I think it's the correct solution. Here is a cached version |
Had same issue. Creating some swap space seems to fix the issue. thanks to https://github.com/ripplesphere |
had same issue. Creating some swap space seems to fix the issue. used this guide for adding 1GB swap: |
Creating swap space worked for me too! |
I am experiencing this issue on windows. Updating npm doesn't fix it for me. I get the following output:
|
Hello! I have this same
I'm using npm 6.1.0 Is this still considered an NPM issue? |
Hi guys, I recommend filing a new issue if you run into a problem rather than commenting on a closed one |
npm ERR! Unexpected end of JSON input while parsing near '...s":"~1.5.0","mime":"1' npm ERR! A complete log of this run can be found in: Aborting installation. Deleting generated file... package.json $ npm -v $ node -v Windows 10 |
Hello guys i am facing some issue when i install react |
Just uninstall yarn or re-install it may fix this. |
Thanks! |
Same issue, I have tried all commands, but still not working create-react-app users Creating a new React app in C:\Users\Abdul Wakeel\Desktop\envato\users. Installing packages. This might take a couple of minutes. yarn add v1.10.1 Aborting installation. Deleting generated file... package.json |
@awakeel as the error suggests, you should use a newer version of node. You are using 8.9.4, you should probably use 8.12.0 LTS. |
|
unfollow this issue |
getting Aborting installation.
npm install --save --save-exact react react-dom react-scripts has failed.
npm version 4.1.2
node version 7.7.1
The text was updated successfully, but these errors were encountered: