create-react-app on Ubuntu with Apt

create-react-app on Ubuntu with Apt

6 minutes 5s
A step by step example of how to install Nodejs, npm, npx using apt, and run create react app.

Install Nodejs in Ubuntu/Debian (using the Apt package manager)


sudo apt install nodejs npm


Check Nodejs version


node --version
npm --version


Version Output


> f02f@computer:~$ node --version
v10.19.0
f02f@computer:~$ npm --version
6.14.4

Check that Npx is available

npx is included with npm


npx --help


Run create-react-app


npx create-react-app my-new-app
cd my-new-app
npm start


The output npm start


Compiled successfully!

You can now view my-new-app in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://172.17.0.2:3000

Note that the development build is not optimized.
To create a production build, use npm run build.