Assuming you do not have anything installed yet, install nodejs and npm using:
sudo apt-get install nodejs npm
Make a project directory to build your app:
Initialize your npm project and add all your project lib/dependencies. You can press enter for all of the questions asked during the
npm init. Or you can use
npm init -y to skip all questions.
npm init OR npm init -y
npm install webpack --save
npm install webpack-dev-server --save
npm install react --save
Alternatively, you can use the library created by the good facebook folks to bootstrap a react project so that you do not have to worry about webpack, babel-core and the rest...
npm install -g create-react-app
Then after it has been installed globally, you can now use it to create a project
Keep project name all in lowercase or you will get an error (this just started of recent).
When that is done,
npm start or
yarn will start up your program at port 3000.