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

commented Jan 27, 2018

thanks

@js2me

This comment has been minimized.

Copy link

commented Feb 1, 2018

thank you

@SaurabhGarg1

This comment has been minimized.

Copy link

commented Feb 3, 2018

thanks. That helps

@bendonlang

This comment has been minimized.

Copy link

commented Feb 3, 2018

Thanks

@77xi

This comment has been minimized.

Copy link

commented Feb 7, 2018

well done

@shereej

This comment has been minimized.

Copy link

commented Feb 9, 2018

thank you

@eladonline

This comment has been minimized.

Copy link

commented Feb 27, 2018

thank you !

@elcordova

This comment has been minimized.

Copy link

commented Feb 28, 2018

gracias

@PetKatt

This comment has been minimized.

Copy link

commented Mar 1, 2018

Gracia Plenna!

@muchamateusz

This comment has been minimized.

Copy link

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

commented Mar 10, 2018

bless.

@nyanjongandrew

This comment has been minimized.

Copy link

commented Mar 16, 2018

Thanks

@ms-vague

This comment has been minimized.

Copy link

commented Mar 19, 2018

Thank you.

@TylerSustare

This comment has been minimized.

Copy link

commented Mar 26, 2018

Tanks braddah

@kube23

This comment has been minimized.

Copy link

commented Mar 27, 2018

@muchamateusz reinstalling node fixed that for me

@kyle-poretto

This comment has been minimized.

Copy link

commented Apr 7, 2018

yeah this is helpful. Awesome!

@ezrqnkemboi-zz

This comment has been minimized.

Copy link

commented Apr 16, 2018

Thanks so much. This has been helpful.

@Narvey

This comment has been minimized.

Copy link

commented Apr 18, 2018

why was this created as a secret gist?

@princecharming519

This comment has been minimized.

Copy link

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

commented May 28, 2018

Nice

@gautam-patadiya

This comment has been minimized.

Copy link

commented Jun 7, 2018

Thanks!

@rymo90

This comment has been minimized.

Copy link

commented Jun 9, 2018

thanks !

@sulemankhan447

This comment has been minimized.

Copy link

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

commented Jun 26, 2018

Appreciated :)

@Iwi4a

This comment has been minimized.

Copy link

commented Jul 12, 2018

Мерси!

@ClarkLusm

This comment has been minimized.

Copy link

commented Jul 17, 2018

Thanks!!!

@arduino731

This comment has been minimized.

Copy link

commented Jul 22, 2018

no wonder thanks

@molochnyk

This comment has been minimized.

Copy link

commented Jul 27, 2018

wow, Thanks )

@yang29

This comment has been minimized.

Copy link

commented Jul 28, 2018

Good stuff

@abodesigner

This comment has been minimized.

Copy link

commented Jul 28, 2018

Everything works well, thanks

@ghost

This comment has been minimized.

Copy link

commented Aug 2, 2018

Thanks :)

@Sokcho05

This comment has been minimized.

Copy link

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

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

commented Sep 26, 2018

Thanks!

@T0nyKo

This comment has been minimized.

Copy link

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

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

commented Oct 25, 2018

Дякую!

@manishn19

This comment has been minimized.

Copy link

commented Nov 12, 2018

Thanks it works :)

@Felix-okeff

This comment has been minimized.

Copy link

commented Dec 11, 2018

wow! It worked.
Thanks alot

@giserman001

This comment has been minimized.

Copy link

commented Dec 29, 2018

good job

@navyblueyes

This comment has been minimized.

Copy link

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

commented Feb 14, 2019

Thank

@duola8789

This comment has been minimized.

Copy link

commented Feb 27, 2019

谢谢

@nigilan

This comment has been minimized.

Copy link

commented Mar 13, 2019

thanks.

@Mohanmo

This comment has been minimized.

Copy link

commented Mar 20, 2019

👍

@PedroPinto23

This comment has been minimized.

Copy link

commented Mar 26, 2019

THANK YOU BRO

@JoseCigarro

This comment has been minimized.

Copy link

commented Jun 22, 2019

Thank you! Is better to install the new version?

@sapozhkov

This comment has been minimized.

Copy link

commented Jul 4, 2019

спасибо )

@RandyKdev

This comment has been minimized.

Copy link

commented Jul 22, 2019

cudos :)

@JeyanthVictory

This comment has been minimized.

Copy link

commented Sep 17, 2019

If I want to upgrade the react version (I meant 'version' inside the package.json file), what I am supposed to do?

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.