Help! I have no idea what is going on here, create react app is not working I have also tried reinstalling and yet to no avail, please help!
Npm version: 5
on Ubuntu 18.04
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
It sets up your development environment so that you can use the latest JavaScript features, provides a nice developer experience, and optimizes your app for production.
You’ll need to have Node >= 8.10 and npm >= 5.6 on your machine. To create a project, run:
npx create-react-app my-app
cd my-app
npm start
Note: npx on the first line is not a typo — it’s a package runner tool that comes with npm 5.2+.
Create react app provides more information regarding this.
It may be the problem of cache also, so can also try:
npm cache clean --force
Edit 1: This may be due to slow internet speed, Please check the internet and try again.
I had the same problem, and I solved it by:
1. update the npm version (npm install npm@latest -g)
2. clear the cache (npm cache clean --force)
3. create the react project (npx create-react-app todo)
(create-react-app was already installed)
Make sure you are not running any antivirus, stop/pause all antivirus or protection software.
You can also try
use create-react-app projectname --save
or create-react-app projectname --save-exact and start again
OR
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.
The problem on my machine was caused by yarn. I am windows 10 and after uninstalling yarn using npm uninstall -g yarn, my script run correctly. So
Please note that the above steps assume that you already have node and react-cli installed on your machine.
Please try this:
npm cache clean --force