0

I want to run my first react app I have installed node I have installed react globally using npm install -g create-react-app but when i want to create react app using npx this happens

C:\Users\deep>npm install -g create-react-app
C:\Users\deep\AppData\Roaming\npm\create-react-app -> C:\Users\deep\AppData\Roaming\npm\node_modules\create-react-app\index.js
+ create-react-app@3.4.1
updated 1 package in 14.608s

C:\Users\deep>cd Desktop

C:\Users\deep\Desktop>cd lets go

C:\Users\deep\Desktop\lets go>npx create-react-app myfirstreact

Creating a new React app in C:\Users\deep\Desktop\lets go\myfirstreact.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

> core-js@2.6.11 postinstall C:\Users\deep\Desktop\lets go\myfirstreact\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.5 postinstall C:\Users\deep\Desktop\lets go\myfirstreact\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.6.5 postinstall C:\Users\deep\Desktop\lets go\myfirstreact\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

+ react-scripts@3.4.1
+ react-dom@16.13.1
+ cra-template@1.0.3
+ react@16.13.1
added 1627 packages from 752 contributors in 367.744s

59 packages are looking for funding
  run `npm fund` for details

How should I run my first react app?

D. Schreier
  • 1,700
  • 1
  • 22
  • 34

2 Answers2

0
npx create-react-app my-app

Use this command to have folders created.

0

Welcome on Stack Overflow.

You should fully read the Getting Started section on ReactJS website which is really complete. https://fr.reactjs.org/docs/create-a-new-react-app.html

By the way,

npx create-react-app mon-app is used to create ReactJS project.

npm start is used to "launch" the project.

Based on What does 'x packages are looking for funding' mean when running `npm install`?. or What does 'x packages are looking for funding' mean when running `npm install`? The funding alert means that some packages that you've installed need some fund (MONEY)

Note: Avoid folder/file name with space that could avoid you some error in the future.

D. Schreier
  • 1,700
  • 1
  • 22
  • 34