3

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

Muhammad Muzamil
  • 1,013
  • 2
  • 18
  • 25

4 Answers4

12

Give this a try:

  • npm install -g create-react-app
  • create-react-app my-app
BinaryBeast
  • 136
  • 2
  • 4
  • 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 – Aljohn Yamaro Dec 06 '19 at 04:33
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.

1

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

sudo npx create-react-app my-app

And it worked :)

Vivek S
  • 179
  • 1
  • 2
  • 17
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!