How to setup new reactjs project on local envoirement or system?

2672 views reactjs

Hello guys I am new on reactjs. I started to learn reactjs for front end in web development. For learning purpose I install node and npm on my local system below are the versions of node and npm

node v8.11.3

npm v5.6.0

and I have run bellow command

npm init

and create pakage.json following file using command

  "name": "loginpage",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^15.4.2",
    "react-dom": "^15.4.2"
  "devDependencies": {
    "react-scripts": "0.9.3"
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  "main": "index.js",
  "author": "rizwan",
  "license": "ISC",
  "description": ""

in next step i run following command install node and react dependencies npm install and then I run create-react-app hello-world commands but I did't find any change in my current local project folder exception pakage.json file I don't know that where I am doing mistake. Guide in right direction.

answered question

2 Answers


To create react app first, install create-react-app globally then, run these commands create-react-app app-name cd app-name npm run start I prefer to use Yarn instead of npm

posted this

Create-react-app creates everything from scratch, you don't need to create a folder or npm init, anything like that.

Just run create-react-app my-project and you'll have everything you need in the my-project folder.

posted this

Have an answer?


Please login first before posting an answer.