If you use npm 5.1 or earlier, you can't use npx
.
Instead, install create-react-app
globally:
npm install -g create-react-app
Now you can run:
create-react-app my-app
If you use npm 5.1 or earlier, you can't use npx
.
Instead, install create-react-app
globally:
npm install -g create-react-app
Now you can run:
create-react-app my-app
Thanks
For those who have an error when using the command
'npm install -g create-react-app'
follow these steps
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo n latest
with that they update npm
and if you have problems with the node version
n 10.16.0
n lts
after
$ n
node / 4.9.1
ο node / 8.11.3
node / 10.15.0
Use up / down arrow keys to select a version, return key to install, d to delete, q to quit
Nice🙂