Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creating a new project with npm <= 5.2

If you use npm 5.1 or earlier, you can't use npx. Instead, install create-react-app globally:

npm install -g create-react-app

Now you can run:

create-react-app my-app
@ramiasg

This comment has been minimized.

Copy link

ramiasg commented Jan 27, 2018

thanks

@js2me

This comment has been minimized.

Copy link

js2me commented Feb 1, 2018

thank you

@SaurabhGarg1

This comment has been minimized.

Copy link

SaurabhGarg1 commented Feb 3, 2018

thanks. That helps

@bendonlang

This comment has been minimized.

Copy link

bendonlang commented Feb 3, 2018

Thanks

@yxuchen

This comment has been minimized.

Copy link

yxuchen commented Feb 7, 2018

well done

@shereej

This comment has been minimized.

Copy link

shereej commented Feb 9, 2018

thank you

@eladonline

This comment has been minimized.

Copy link

eladonline commented Feb 27, 2018

thank you !

@elcordova

This comment has been minimized.

Copy link

elcordova commented Feb 28, 2018

gracias

@PetKatt

This comment has been minimized.

Copy link

PetKatt commented Mar 1, 2018

Gracia Plenna!

@muchamateusz

This comment has been minimized.

Copy link

muchamateusz commented Mar 8, 2018

I did everything as it says to do and after successful installing create-react-app i still can't use create-react-app apps-name.
I have no idea why :/

@msaldana45

This comment has been minimized.

Copy link

msaldana45 commented Mar 10, 2018

bless.

@nyanjongandrew

This comment has been minimized.

Copy link

nyanjongandrew commented Mar 16, 2018

Thanks

@ms-vague

This comment has been minimized.

Copy link

ms-vague commented Mar 19, 2018

Thank you.

@TylerSustare

This comment has been minimized.

Copy link

TylerSustare commented Mar 26, 2018

Tanks braddah

@kube23

This comment has been minimized.

Copy link

kube23 commented Mar 27, 2018

@muchamateusz reinstalling node fixed that for me

@kyle-poretto

This comment has been minimized.

Copy link

kyle-poretto commented Apr 7, 2018

yeah this is helpful. Awesome!

@ezrqnkemboi

This comment has been minimized.

Copy link

ezrqnkemboi commented Apr 16, 2018

Thanks so much. This has been helpful.

@Narvey

This comment has been minimized.

Copy link

Narvey commented Apr 18, 2018

why was this created as a secret gist?

@princecharming519

This comment has been minimized.

Copy link

princecharming519 commented May 25, 2018

Well done, but I want to know about npx in detail.
Hope to see you soon.
Thx.

@Suil3File

This comment has been minimized.

Copy link

Suil3File commented May 28, 2018

Nice

@gautam-patadiya

This comment has been minimized.

Copy link

gautam-patadiya commented Jun 7, 2018

Thanks!

@rymo90

This comment has been minimized.

Copy link

rymo90 commented Jun 9, 2018

thanks !

@sulemankhan447

This comment has been minimized.

Copy link

sulemankhan447 commented Jun 10, 2018

screenshot 730
why it doesnt create this react folder in desktop instead it creates to some another folder

@moinadnan-vteams

This comment has been minimized.

Copy link

moinadnan-vteams commented Jun 26, 2018

Appreciated :)

@Iwi4a

This comment has been minimized.

Copy link

Iwi4a commented Jul 12, 2018

Мерси!

@ClarkLusm

This comment has been minimized.

Copy link

ClarkLusm commented Jul 17, 2018

Thanks!!!

@arduino731

This comment has been minimized.

Copy link

arduino731 commented Jul 22, 2018

no wonder thanks

@molochnyk

This comment has been minimized.

Copy link

molochnyk commented Jul 27, 2018

wow, Thanks )

@yang29

This comment has been minimized.

Copy link

yang29 commented Jul 28, 2018

Good stuff

@abodesigner

This comment has been minimized.

Copy link

abodesigner commented Jul 28, 2018

Everything works well, thanks

@maitienhiep

This comment has been minimized.

Copy link

maitienhiep commented Aug 2, 2018

Thanks :)

@Sokcho05

This comment has been minimized.

Copy link

Sokcho05 commented Sep 4, 2018

it just says npm is not recognized as an internal or external command, operable program, or batch file

@ianchanning

This comment has been minimized.

Copy link

ianchanning commented Sep 7, 2018

Note that by default npm install -g will install to /usr/local/bin which requires sudo access. See the npm docs on installing packages globally for more info.

Also as per the npm trouble shooting guide:

(You may need to prefix these commands with sudo, especially on Linux, or OS X if you installed Node using its default installer.)

@FacuFigo

This comment has been minimized.

Copy link

FacuFigo commented Sep 26, 2018

Thanks!

@T0nyKo

This comment has been minimized.

Copy link

T0nyKo commented Oct 2, 2018

@muchamateusz reinstalling node fixed that for me

Kube23.....You sir, are a genius. Uninstalling then installing Node.js allowed npx to work properly for me. https://treehouse.github.io/installation-guides/windows/node-windows.html

@paulTchaa8

This comment has been minimized.

Copy link

paulTchaa8 commented Oct 13, 2018

Hey guy, Thanks a lot. It worked! Now how to parse a markdown code to an html? I've used the new Remarkable() object, then called the render method with no success. It's said on the http:localhost:3000 page Remarkable is not derfined. What to do please?

const md = new Remarkable();
...
<div id="preview" className="previewer" dangerouslySetInnerHTML = {{__html: md.render(this.state.markdown)}}/>
@yozhsh

This comment has been minimized.

Copy link

yozhsh commented Oct 25, 2018

Дякую!

@manishn19

This comment has been minimized.

Copy link

manishn19 commented Nov 12, 2018

Thanks it works :)

@Felix-okeff

This comment has been minimized.

Copy link

Felix-okeff commented Dec 11, 2018

wow! It worked.
Thanks alot

@giserman001

This comment has been minimized.

Copy link

giserman001 commented Dec 29, 2018

good job

@navyblueyes

This comment has been minimized.

Copy link

navyblueyes commented Jan 28, 2019

Installed onto ubuntu server, but i got a wierd error
/usr/bin/env: ‘node’: No such file or directory

Below is the output:

cabox@BlocChat:~/workspace$ sudo npm install -g create-react-app
/usr/local/bin/create-react-app -> /usr/local/lib/node_modules/create-react-app/index.js
/usr/local/lib
└─┬ create-react-app@2.1.3
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
  │ ├─┬ has-ansi@2.0.0
  │ │ └── ansi-regex@2.1.1
  │ ├── strip-ansi@3.0.1
  │ └── supports-color@2.0.0
  ├── commander@2.18.0
  ├─┬ cross-spawn@4.0.2
  │ ├─┬ lru-cache@4.1.5
  │ │ ├── pseudomap@1.0.2
  │ │ └── yallist@2.1.2
  │ └─┬ which@1.3.1
  │   └── isexe@2.0.0
  ├── envinfo@5.11.1
  ├─┬ fs-extra@5.0.0
  │ ├── graceful-fs@4.1.15
  │ ├── jsonfile@4.0.0
  │ └── universalify@0.1.2
  ├─┬ hyperquest@2.1.3
  │ ├── buffer-from@0.1.2
  │ ├─┬ duplexer2@0.0.2
  │ │ └─┬ readable-stream@1.1.14
  │ │   ├── isarray@0.0.1
  │ │   └── string_decoder@0.10.31
  │ └─┬ through2@0.6.5
  │   ├── readable-stream@1.0.34
  │   └── xtend@4.0.1
  ├── semver@5.5.1
  ├─┬ tar-pack@3.4.1
  │ ├─┬ debug@2.6.9
  │ │ └── ms@2.0.0
  │ ├─┬ fstream@1.0.11
  │ │ ├── inherits@2.0.3
  │ │ └─┬ mkdirp@0.5.1
  │ │   └── minimist@0.0.8
  │ ├─┬ fstream-ignore@1.0.5
  │ │ └─┬ minimatch@3.0.4
  │ │   └─┬ brace-expansion@1.1.11
  │ │     ├── balanced-match@1.0.0
  │ │     └── concat-map@0.0.1
  │ ├─┬ once@1.4.0
  │ │ └── wrappy@1.0.2
  │ ├─┬ readable-stream@2.3.6
  │ │ ├── core-util-is@1.0.2
  │ │ ├── isarray@1.0.0
  │ │ ├── process-nextick-args@2.0.0
  │ │ ├── safe-buffer@5.1.2
  │ │ ├── string_decoder@1.1.1
  │ │ └── util-deprecate@1.0.2
  │ ├─┬ rimraf@2.6.3
  │ │ └─┬ glob@7.1.3
  │ │   ├── fs.realpath@1.0.0
  │ │   ├── inflight@1.0.6
  │ │   └── path-is-absolute@1.0.1
  │ ├─┬ tar@2.2.1
  │ │ └── block-stream@0.0.9
  │ └── uid-number@0.0.6
  ├─┬ tmp@0.0.33
  │ └── os-tmpdir@1.0.2
  └─┬ validate-npm-package-name@3.0.0
    └── builtins@1.0.3

cabox@BlocChat:~/workspace$ create-react-app BlocChat
/usr/bin/env: ‘node’: No such file or directory
@Suil3File

This comment has been minimized.

Copy link

Suil3File commented Feb 14, 2019

Thank

@duola8789

This comment has been minimized.

Copy link

duola8789 commented Feb 27, 2019

谢谢

@nigilan

This comment has been minimized.

Copy link

nigilan commented Mar 13, 2019

thanks.

@Mohanmo

This comment has been minimized.

Copy link

Mohanmo commented Mar 20, 2019

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.