create-react-app doesn't generate public and src folders thus cannot get started

Created on 26 Jan 2020  路  15Comments  路  Source: facebook/create-react-app

create-react-app doesn't generate public and src folders thus cannot get started.

  • I am create react project using below steps:
    npx create-react-app my-app
    cd my-app
    npm start

  • Versions:-
    "Node": 10.14.2
    "npm": 6.13.4

  • Dependencies
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-router-dom": "^5.1.2",
    "react-scripts": "3.3.0"

bug report needs triage

Most helpful comment

In my case I had a version of create-react-app installed globally on my machine. I had to remove it using npm uninstall -g create-react-app. After that, it worked.

All 15 comments

Same here

In my case I had a version of create-react-app installed globally on my machine. I had to remove it using npm uninstall -g create-react-app. After that, it worked.

@sedhalsoni, most likely, you have a global installation of the CRA. @maximecote57's suggestion should work for you.

@maximecote57 I completely unistalled create-react-app but still the same issue .

Steps:
remove create-react-app using npm uninstall -g create-react-app
and check then also exist do rm -rf /usr/local/bin/create-react-app
then do npx create-react-app my-app

@sirshikher About the second step i am in windows :)

and check then also exist do rm -rf /usr/local/bin/create-react-app

How to do that in Windows ?

@sirshikher About the second step i am in windows :)

and check then also exist do rm -rf /usr/local/bin/create-react-app

How to do that in Windows ?

Elevate to cmd prompt: where create-react-app it must be somewhere in the system files under yarn. follow that path and delete both the files.

@sirshikher I get this on the end of create-react-app

...
鈹斺攢 [email protected]
Done in 117.92s.

A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.

Hm i am searching inside npm root , it's not inside node_modules also npm list -g -- depth = 0 doesn't show it there .

I am ready to burn the laptop .

@sirshikher I get this on the end of create-react-app

...
鈹斺攢 [email protected]
Done in 117.92s.

A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.

Hm i am searching inside npm root , it's not inside node_modules also npm list -g -- depth = 0 doesn't show it there .

I am ready to burn the laptop .

@sirshikher I get this on the end of create-react-app

...
鈹斺攢 [email protected]
Done in 117.92s.

A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.

Hm i am searching inside npm root , it's not inside node_modules also npm list -g -- depth = 0 doesn't show it there .

I am ready to burn the laptop .

have you tried with npx. i.e npx create-react-app my-app
Try any of these :-
npx create-react-app my-app
npm init react-app my-app
yarn create react-app my-app

@sirshikher Yes :(

@sirshikher npm init react-app my-app this works , i mean it shouldn't because create-react-app shouldn't be globally installed.

@sirshikher Yes :(

before that install this npm install create-react-app@latest otherwise its a cache problem.

@sirshikher This installed create-react-app on my desktop

image

Seems like a cache problem or something .

@sirshikher Now i have to do that everytime when a new create-react-app update comes out ? I mean install it on desktop and go from there :) ?

Download yarn from here https://www.npmjs.com/package/yarn after that run this command:
yarn create-react-app my-app

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaveLindberg picture DaveLindberg  路  3Comments

alleroux picture alleroux  路  3Comments

dualcnhq picture dualcnhq  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

alleroux picture alleroux  路  3Comments