create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

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

Open ethanneff opened this issue 9 years ago • 10 comments

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Yes

Which terms did you search for in User Guide?

command not found

Environment

[09:00 PM]-[eneff@Ethans-Mac]-[~/Desktop]-[]
$ node -v
v6.11.4

[09:00 PM]-[eneff@Ethans-Mac]-[~/Desktop]-[]
$ npm -v
4.6.1

[09:00 PM]-[eneff@Ethans-Mac]-[~/Desktop]-[]
$ npm install -g create-react-app
npm WARN deprecated [email protected]: connect 2.x series is deprecated
npm WARN [email protected] requires a peer of react-native-vector-icons@~4.3.0 but none was installed.
npm WARN [email protected] requires a peer of react@> 15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@>=15.4.0 but none was installed.
npm WARN [email protected] requires a peer of react@>=15.3.1 but none was installed.

[09:01 PM]-[eneff@Ethans-Mac]-[~/Desktop]-[]
$ create-react-app my-app
-bash: create-react-app: command not found

Mac 10.13 (17A365)

Steps to Reproduce

  1. Install Node
  2. Follow Guide

Expected Behavior

create-react-app my-app works

Actual Behavior

create-react-app my-app fails

Reproducible Demo

n/a

ethanneff avatar Oct 05 '17 04:10 ethanneff

This is probably an issue in your PATH. Did you try fixes suggested in https://github.com/facebookincubator/create-react-app/issues/138, https://github.com/facebookincubator/create-react-app/issues/1182, https://github.com/facebookincubator/create-react-app/issues/962 ?

tharakawj avatar Oct 05 '17 04:10 tharakawj

Figured it out. $PATH was fine. I had a directory called create-react-app which was conflicting with npm install -g create-react-app.

Thanks!

ethanneff avatar Oct 05 '17 05:10 ethanneff

I have the same problem!

kaixinfu avatar Nov 14 '17 01:11 kaixinfu

This worked for me

npx create-react-app my-app

just preview create-react-app with "npx"

learnwithalfred avatar May 01 '18 17:05 learnwithalfred

Hi. So how does someone solve the issue of path in linux

davidshare avatar May 21 '18 17:05 davidshare

yap you'r right sir @nkuranhy3 , that npx worked on me too

Mogust avatar Jun 14 '18 01:06 Mogust

This Solution. npx create-react-app my-app

fsrocha-dev avatar Jun 30 '18 03:06 fsrocha-dev

npx create-react-app my-app Worked for me, too. Thank you.

veselin0 avatar Sep 24 '18 06:09 veselin0

npx create-react-app my-app It's work. Thank you ))

ivanglubish avatar Nov 10 '18 21:11 ivanglubish

npx worked for. Thank you!

victorgianvechio avatar Nov 20 '18 18:11 victorgianvechio