facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.49k stars 26.77k forks source link

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

Closed iercetin closed 4 years ago

iercetin commented 4 years ago

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.

miraage commented 4 years ago

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...
codixir commented 4 years ago

same here

meshack-mbuvi commented 4 years ago

It's still happening on my side

juliodenis commented 4 years ago

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

juliodenis commented 4 years ago

yarn create react-app my-app

rob88 commented 4 years ago

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

WvlRampage commented 4 years ago

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.

mariofelipefarhat commented 4 years ago

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

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

afeedhshaji commented 4 years ago

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!

rwieruch commented 4 years ago

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

carsimoes commented 4 years ago

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!

xuoutput commented 4 years ago

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

vidhyeshpatil commented 4 years ago

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)

dschlossman commented 4 years ago

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.

Srikrishnan96 commented 4 years ago

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 commented 4 years ago

Hi thank you for the help :)

On Mon, Dec 23, 2019 at 5:45 PM mabafa6831 notifications@github.com wrote:

Already Solved At Here https://icetutor.com/question/template-not-provided-using-create-react-app/

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebook/create-react-app/issues/8088?email_source=notifications&email_token=AKJRPFZ5HW3TXPIELAUBVDDQ2FSVBA5CNFSM4JV3RV6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHSIDNA#issuecomment-568623540, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKJRPF6XDO7MNY5XV5B6SPTQ2FSVBANCNFSM4JV3RV6A .