public, src,and scripts folder not created while using create-react-app

前端 未结 12 1873
囚心锁ツ
囚心锁ツ 2020-12-14 07:48

I am trying to create a new project using create-react-app using the command given on the docs i.e npx create-react-app my-app but it doesn\'t cont

12条回答
  •  情歌与酒
    2020-12-14 08:34

    For those who keep trying and still doesn't work, you might have the same problem as me.

    Because the global installs of create-react-app are no longer supported you might have it installed on your machine, thus have the old version running whenever you try to npx create-react-app. There are 2 very easy steps: remove create-react-app, then run the npx command.

    It will look like this:

    1. sudo npm rm -g create-react-app (sudo is needed on macs to grant you permission, it will ask for your password, type it in and hit enter)
    2. npx create-react-app my-app

    Should solve your problem there

提交回复
热议问题