Sunday, March 3, 2019

Install ReactJS on Windows using NPM with help of NODEJS

First needs to install NodeJS, for windows users, go to https://nodejs.org/en/ and download your suitable installer and install if not alredy installed.
After installation completed go to your installation directory (for me its C:\Program Files\nodejs\node_modules) and check there is a folder named "npm", if exists open a command prompt (WINDOWS_BUTTON+CMD) and type command "npm -v" to see if nodejs installed properly.

Now time to install React from Terminal: npm install -g create-react-app, it will take some time to complete.

If successful, you should be able to get version: create-react-app --version
Now time to create a project: create-react-app react_app1, after create project navigate to project directory using cd react_app1

Expected output in terminal (and should auto open browser to port 3000) on start project using command npm start:


1 comment: