osx create-react-app not installing

Viewed 1604

I am trying to install react using the terminal command:

npm install -g create-react-app

But it doesn't seem to be working and I get the following output:

create-react-app output

Does anyone know what might be the problem here?

2 Answers

As I see in screenshot, you just need use this command as administrator sudo npm install -g create-react-app.

In case you stumbled here because of this error:

-bash: create-react-app: command not found

Then you need to do this:

npx create-react-app yourApp

Essentially you need to prepend create-react-app with npx.

Related