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

前端 未结 12 1863
囚心锁ツ
囚心锁ツ 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:27

    had the same issue on my mac. The correct way is if you've previously installed create-react-app globally via npm install -g create-react-app, you have to uninstall the package using npm uninstall -g create-react-app in order npx to uses the latest version.

    Tips: Try npx create-react-app --info to check if npmGlobalPackages includes create-react-app. If cra is included then try the below command which create-react-app and rm -rf the outputted path.

    Last but not least, force npx to use latest:

    npx create-react-app@latest your-project-name

提交回复
热议问题