Aborting installation. npm install --save --save-exact react react-dom react-scripts has failed.
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
Can you post a complete console output? Also could you please follow these diagnostic steps and report the result?
This diagnostic code is now in [email protected], if you could test the new version and provide the output, that'd be great!
npm install -g create-react-app@latest
Creating a new React app in /home/project-penguin.
Installing packages. This might take a couple minutes. Installing react, react-dom, and react-scripts...
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 ๐ฆ [ .....] \ extract:camel-case: verb gentlyRm don't care about conte Aborting installation. npm install --save --save-exact react react-dom react-scripts has failed.
Which OS are you using? Have you tried using npm 3.x? It may be a new bug.
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: https://www.davidmeents.com/blog/how-to-simply-deploy-a-react-app-on-digital-ocean/
@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 https://github.com/facebookincubator/create-react-app/issues/1735#issuecomment-284605778 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).
We mention it in the docs for build: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-silently-fails.
Maybe we should make that entry more generic.
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 ! I tried to uninstall node, npm, create-react-app many times... Finally, I ended up modifying the "index.js" file of create-react-app script with the following :
Before:
return install(useYarn, allDependencies, verbose, isOnline).then(function() {
return packageName;
});
After:
return install(useYarn, allDependencies, verbose, isOnline).then(function() {
return packageName;
}).catch(function() {return packageName;});
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.
The error message is: { command: 'npm install --save --save-exact react react-dom react-scripts' }.
I think it's an NPM issue, packages are well installed, but NPM exit without a success behavior.
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 npm install --save --save-exact react react-dom react-scripts command manually. It exited promptly but was able to check whether or not packages were installed.
I wouldn't advise to implement my workaround, but it may be useful if someone is brave enough to try it manually :-)