create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

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

Open iercetin opened this issue 6 years ago • 17 comments

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.

iercetin avatar Dec 05 '19 15:12 iercetin

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...

miraage avatar Dec 05 '19 15:12 miraage

same here

codixir avatar Dec 06 '19 13:12 codixir

It's still happening on my side

meshack-mbuvi avatar Dec 06 '19 16:12 meshack-mbuvi

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

juliodenis avatar Dec 06 '19 16:12 juliodenis

yarn create react-app my-app

juliodenis avatar Dec 06 '19 17:12 juliodenis

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

rob88 avatar Dec 08 '19 02:12 rob88

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.

WvlRampage avatar Dec 09 '19 17:12 WvlRampage

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

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

mariofelipefarhat avatar Dec 12 '19 17:12 mariofelipefarhat

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!

afeedhshaji avatar Dec 12 '19 19:12 afeedhshaji

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

rwieruch avatar Dec 13 '19 02:12 rwieruch

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!

carsimoes avatar Dec 13 '19 18:12 carsimoes

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

xuoutput avatar Dec 14 '19 02:12 xuoutput

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)

vidhyeshpatil avatar Dec 14 '19 17:12 vidhyeshpatil

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.

dschlossman avatar Dec 15 '19 20:12 dschlossman

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?

Srikrishnan96 avatar Dec 20 '19 20:12 Srikrishnan96