Create-react-app: [ src + public ] folders are never generated

Created on 28 Jan 2020  路  7Comments  路  Source: facebook/create-react-app

Hi :)

"Node": 12.14.1
"npm": 6.13.4
"react-scripts": "3.3.0"

I completely unistalled create-react-app from npm global scope .

From the command prompt in Windows 10 i am running :

npx create-react-app my-app

But all i get is the below :

image

No matter how many times i run it i never get src folders :(

Please give me a hint why this might happen .

bug report needs triage

All 7 comments

News? I'm facing the same problem...

Nope :) @wilsonneto-dev

Facing this same issue. I'll I'm getting is a folder with a package.json, package-lock.json, and node modules. Nothing else.

I had the same problem. It helped me:
https://github.com/facebook/create-react-app/issues/8097

Since create-react-app 3.3.0 it's not longer recommended to use a global installation of CRA.

However, after following the recommended way, uninstalling CRA globally and using npm,I ran into the following problem for my new React project:

A template was not provided. This is likely because you're using an outdated version of create-react-app.

It seems like CRA wasn't properly uninstalled. I had to do the following:

After uninstalling it with npm uninstall -g create-react-app, check whether you still have it "installed" with which create-react-app on your command line. If it returns something (e.g. /usr/local/bin/create-react-app), then do a rm -rf /usr/local/bin/create-react-app to delete manually.

Afterward, I was able to use npx create-react-app my-app with the latest version of CRA where I would have the default template for the src/ folder.

@MikhailGA In windows i did npm root g , gone into node_modules but create-react-app is not there . Though if i do create-react-app from cmd it appears to be globally installed even if i completely unistalled it globally , any ideas :) ?

Update on what the issue was for me, not sure if anyone else will find this helpful though:

I use WSL but have yarn installed on my Windows side of things, and somehow my .yarn folder on my Windows filesystem made it into the PATH of my Ubuntu installation. Removing the .yarn folder from my PATH, running an npm uninstall -g create-react-app, then running npx create-react-app test caused everything to work properly.

@MikhailGA @samwightt Thank you guys i combined your solutions and issue solved .

What i did :

1) npm unistall -g create-react-app
2) yarn global remove create-react-app

And then :

npx create-react-app hello-bros

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fson picture fson  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

rdamian3 picture rdamian3  路  3Comments

Evan-GK picture Evan-GK  路  3Comments

wereHamster picture wereHamster  路  3Comments