0

Does (npm init react-app my-app) install create-react-app globally like (npm install -g create-react-app)? If not, how is (npm init react-app my-app) different from (npx create-react-app my-app)?

Abaga
  • 41
  • 6

2 Answers2

0

It's not different, both commands don't install anything globally and do pretty much the same. However, init will add create- to the command and should be used to setup projects, while npx can be used for anything and will first look if the command is installed in the current project and use that if available.

matthiasgiger
  • 506
  • 4
  • 10
0

Please use this template. Here all problems/issues are solved.

npx create-react-app --template all

Chaurasia
  • 524
  • 4
  • 21