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
f02f@computer:~$ npm --version

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:

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