Create-react-app: public, src,and scripts folder not created while installing react-app

Created on 5 Dec 2019  Â·  16Comments  Â·  Source: facebook/create-react-app

npx version: 6.13.2
node version: 12.13.1
npm : 6.13.2

  1. Created a react-app using: npx create-react-app my-app

Folder with node_modules, package.json and packageloack.json is created but src, public and scripts folder is not created.

Tried reinstalling nodejs, clearing cache etc. nothing worked.

Edit:

  1. npm rm -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app my-app

Doing that solved my problem.

bug report needs triage

Most helpful comment

I bet you had seen the following message:

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.

Run npm rm -g create-react-app and try again.

When using correct create-react-app version, you will see an additional package cra-template

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

While previous versions show smth like

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

All 16 comments

I bet you had seen the following message:

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.

Run npm rm -g create-react-app and try again.

When using correct create-react-app version, you will see an additional package cra-template

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

While previous versions show smth like

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

same here

It's still happening on my side

I could not with npm, I uninstall globally but it doesn't work. Then I tried with yarn and it works for me

yarn create react-app my-app

I had a same problem first of all run this command
npm rm -g create-react-app
Then
delete all the previous projects you have created
then
create a new folder by running this command mkdir react-app
then

yarn create react-app my-app

if it doesnt work you need to install yarn globally by running this command npm install -g yarn

once you have done that run this command
yarn create react-app my-app

the new app should have the full project template

I fixed this issue doing the nexts steps:

  1. npm rm -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app my-app

And it works perfectly.

I fixed using yarn create react-app my-app.

I don't know why the creation isn't working with npm yet

I fixed this issue doing the nexts steps:

  1. npm rm -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app my-app

And it works perfectly.

Yeah it works. Perfect!

I fixed this issue doing the nexts steps:

  1. npm rm -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app my-app

And it works perfectly.

Same problem here. Solved after these steps.
Tks!

I fixed this issue doing the nexts steps:

  1. npm rm -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app my-app

And it works perfectly.

https://github.com/facebook/create-react-app/issues/8097

I fixed this issues by doing following steps:

  1. npm uninstall -g create-react-app
  2. npx create-react-app my-app

Works perfectly.

Note: No need to install create-react-app globally again, npx (executable version) handles everything on runtime (as virtual installation)

this solution didn't work for me, but generates fine using yarn.
npm -v 12.1
node -v 12.13.1

Installed npm/node using the download for macOS nodejs
previously had everything working, not sure what changed.

I fixed this issue doing the nexts steps:

  1. npm rm -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app my-app

And it works perfectly.

Hello WvlRampage, may i know how you figured out this fixture?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Evan-GK picture Evan-GK  Â·  3Comments

Aranir picture Aranir  Â·  3Comments

ap13p picture ap13p  Â·  3Comments

alleroux picture alleroux  Â·  3Comments

barcher picture barcher  Â·  3Comments