1

Creating a new React app in G:\reactproject.

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 G:\reactproject\node_modules\babel-runtime\node_modules\core-js node -e "try{require('./postinstall')}catch(e){}"

core-js@3.6.2 postinstall G:\reactproject\node_modules\core-js node -e "try{require('./postinstall')}catch(e){}"

core-js-pure@3.6.2 postinstall G:\reactproject\node_modules\core-js-pure node -e "try{require('./postinstall')}catch(e){}"

  • react@16.12.0
  • react-dom@16.12.0
  • cra-template@1.0.0
  • react-scripts@3.3.0 added 1535 packages from 745 contributors and audited 906206 packages in 180.308s

33 packages are looking for funding run npm fund for details

found 0 vulnerabilities

Abhijit
  • 11
  • 2
  • When I install via npx create-react-app reactproject show me this and I can't install reactJs. Please help me. Thanks in advance – Abhijit Jan 08 '20 at 17:17
  • Looks like you already did. Run `npm list react`, if it returns a version you were successful – Brian Thompson Jan 08 '20 at 17:20
  • Yes return react version. But where the src folder public folder? How can i get app.js file main.js file – Abhijit Jan 08 '20 at 17:25
  • React is a library not a framework. You have to create all of the folder structure yourself. React doesn't require it or create it for you. Create-react-app is what does that for you. If its not working the problem is with CRA not react – Brian Thompson Jan 08 '20 at 17:30
  • If you look inside of `G:\reactproject` you don't see anything? – Brian Thompson Jan 08 '20 at 17:34
  • I am new in reactJs. So I have no Knowledge to create those folder structure. How can i get those file. Can you help me? – Abhijit Jan 08 '20 at 17:35
  • What was the path in your command prompt when you used "create-react-app reactproject"? – AndrewL64 Jan 08 '20 at 17:42
  • This was my path G:\npx create-react-app reactproject – Abhijit Jan 08 '20 at 17:46
  • So you have change path to `G:` first before running `npx create-react-app reactproject`? – AndrewL64 Jan 08 '20 at 17:47
  • No No. C:\Users\Abhijit Paul> This was the path. Then I changed my path to G: and run npx create-react-app reactproject – Abhijit Jan 08 '20 at 17:50
  • What is inside the `reactproject` folder right now? – AndrewL64 Jan 08 '20 at 17:53
  • `node_modules` folder, `package.json` file & `package-lock.json` file – Abhijit Jan 08 '20 at 17:55
  • After reading all the valuable comments, I am guessing that the question could be that create-react-app command couldn't generate the complete file structure. If thats the case, Check this [thread](https://stackoverflow.com/questions/61708568/create-react-app-only-creates-node-modules-package-and-package-lock/61708736#61708736)! – Aditya Patnaik May 10 '20 at 08:01

2 Answers2

0

According to the discussion in this thread from the official create-react-app github, you can just run the same command but with the --ignore-existing flag added and it should re-install your react application with all the necessary files included.

npx --ignore-existing create-react-app reactproject

Just navigate to your G: drive in your terminal and then run the above like this:

> cd G:
> npx --ignore-existing create-react-app reactproject
AndrewL64
  • 15,794
  • 8
  • 47
  • 79
0

I also ran into this problem a couple of minutes ago.

$ npm install -g create-react-app 
$ create-react-app my-react-app
$ cd my-react-app
$ npm start

Happy Hacking!

Michalis Garganourakis
  • 2,872
  • 1
  • 11
  • 24