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

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

    I had the same problem, this how I solved it.

    When I try to run npm rm -g create-react-app, it shows an error.

    So I went to the node modules directory (for Mac /usr/local/lib/node_modules) and delete create-react-app directory and reinstall create-react-app using npx create-react-app my-app.

    0 讨论(0)
  • 2020-12-14 08:43

    I tried all the suggestion stated above but none works for me. This suggestion at 8097 works for me. Basically, I just run npx create-react-app@latest your-project-name

    0 讨论(0)
  • 2020-12-14 08:45

    Still didn't got to know the issue. But i tried :-

    npm rm -g create-react-app
    npm install -g create-react-app
    npx create-react-app my-app
    

    This also didn't worked for me. So I uninstalled node and installed it again. It worked for me

    0 讨论(0)
  • 2020-12-14 08:46

    Try with these steps :

    1. npm rm -g create-react-app
    2. npm install -g create-react-app
    3. npx create-react-app my-app

    Source

    0 讨论(0)
  • 2020-12-14 08:46

    Follow the following steps and that should solve your problem.

    1. sudo npm rm -g create-react-app (Do not skip sudo if you are a macOS user).

    2. npx create-react-app my-app (npm 5.2+ and higher) or npm init react-app my-app or yarn create react-app my-app (if you use yarn)

    0 讨论(0)
  • 2020-12-14 08:50

    You can uninstall a globally installed package with this: npm uninstall -g create-react-app

    0 讨论(0)
提交回复
热议问题