Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create react app not wroking #6741

Open
ghost opened this issue Apr 2, 2019 · 8 comments
Open

create react app not wroking #6741

ghost opened this issue Apr 2, 2019 · 8 comments

Comments

@ghost
Copy link

ghost commented Apr 2, 2019

Is this a bug report?

(write your answer here)

Did you try recovering your dependencies?

(Write your answer here.)

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Environment

(paste the output of the command here)

Steps to Reproduce

(Write your steps here:)

  1. i created a folder in my D drive named react
  2. wrote the comand npm init react-app my-app
  3. but it shows the folllowing error.

Expected Behavior

i expected to create my project folder
(Write what you thought would happen.)

Actual Behavior

Screenshot (59)

(Write what happened. Please add screenshots!)
Screenshot (59)

Reproducible Demo

i just started react js using thus command

(Paste the link to an example project and exact instructions to reproduce the issue.)

@teksrc
Copy link

teksrc commented Apr 2, 2019

Hi @sankhadip2000 the command to initialize a new create react app is not npm init react app, it's create-react-app my-new-app and that will scaffold the project. You could create a directory before hand so for ex:

cd Desktop/Coding
create-react-app new-app
cd new-app

@heyimalex
Copy link
Contributor

@Frankcarvajal Actually this changed semi-recently, and I think npx create-react-app my-app is the favored way as of today, though npm init react-app my-app should work as well.

@sankhadip2000 Try with npx create-react-app my-app and if that doesn't work, paste the output of running npx create-react-app --info.

@verde79
Copy link

verde79 commented Apr 8, 2019

@heyimalex can I clarify if we need a global install of CRA anymore if npx create-react-app my-app is now preferred. Does npm init react-app my-app need it either?

@heyimalex
Copy link
Contributor

heyimalex commented Apr 8, 2019

@verde79 I'm pretty sure that npm init react-app my-app does not require create-react-app to be globally installed; reading the docs for init it seems like it uses npx under the hood.

@ravid7000
Copy link

I'm also facing similar issue on mac, don't understand what is the issue.

Screenshot 2019-05-05 at 12 18 37 AM

@ravid7000
Copy link

More details:
I tried all commands to create react app:

create-react-app my-app
Screenshot 2019-05-05 at 12 21 59 AM

npm init react-app my-app
Screenshot 2019-05-05 at 12 22 17 AM

yarn create react-app my-app
Screenshot 2019-05-05 at 12 22 53 AM

Output file:
package.json
Screenshot 2019-05-05 at 12 23 48 AM

@ianschmitz
Copy link
Contributor

Can you try npm uninstall -g create-react-app followed by npx create-react-app my-app?

@ravid7000
Copy link

Working now. Issue seems like with global installed package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants