4

I am trying to create react app using command create-react-app test. This command only creates a project directory with package.json file.File containing...

{
  "name": "test",
  "version": "0.1.0",
  "private": true
}

Node version 11.11.0 & NPM version 6.7.0 with cmd Same issue with widnows CMD

with bash CLI it is also creating error with bash CLI it is also creating error

5
  • 1
    Can you post the output from terminal after running “$ npx create-react-app test2”? Commented Mar 13, 2019 at 6:22
  • Would also be helpful to see your environment: “$ npx create-react-app —info” Commented Mar 13, 2019 at 6:30
  • i have edited the question with screen shoot please see the given images Commented Mar 13, 2019 at 6:35
  • Try reinstalling: show the output for “$ npm i -g create-react-app” Commented Mar 13, 2019 at 6:39
  • Can you verify that C:\WINDOWS\system32\cmd.exe exists on your system. On which partition is Windows installed? This looks like an issue with cmd path. Commented Mar 13, 2019 at 13:33

4 Answers 4

12

Give this a try:

  • npm install -g create-react-app
  • create-react-app my-app
Sign up to request clarification or add additional context in comments.

2 Comments

it updates things from npm install -g create-react-app then when i run create-react-app my-app. It installs things that i need not only package.json. Thank you
Didn't change a thing for me !
1

If you are windows user the reason could be you have windows(32 bit) with Node(64 bit) or vice versa. The solution is install node(32 bit) for windows(32 bit) and same for 64 bit too.

Comments

1

In mac OS, I just added 'sudo' like this

sudo npx create-react-app my-app

And it worked :)

Comments

0

Happened the same with me! npx create-react-app my-app was just creating package.json file for me. But I waited for some time and found that my terminal was still active and was installing some more scripts which is actually responsible for creating some directories and files inside'em which we're looking for.

If this doesn't helps, you can run the following in your terminal:

npm install -g create-react-app

This will install the required dependencies to load the directories which should be pre-loaded at the time of creation of a react-app!

1 Comment

An how do you deactivate the terminal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.