Npm create-react-app not working. Usage: npm<command>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joshuaschist
    New Member
    • Sep 2020
    • 10

    Npm create-react-app not working. Usage: npm<command>

    How do I fix this npm create react app issue
    Attached Files
    Last edited by Joshuaschist; Oct 1 '20, 08:21 AM. Reason: Wrong spelling
  • Sumit Sahu
    New Member
    • Oct 2020
    • 1

    #2
    Hi Joshuaschist,

    So you are using
    Code:
     npm create-react-app react-timer
    command to create new react app with the name "react-timer". Here "create-react-app" is a node module, which you have to install it first either locally or globally, then run the command
    Code:
    npm install create-react-app react-timer
    . If you miss the "install" in command, then how would 'npm' know, what to do with 'create-react-app' that means, whether to install it or uninstall it. Or you are trying to create a react project then just use
    Code:
     npx create-react-app my-app
    . Follow this get started guide to work with react https://create-react-app.dev/docs/getting-started/ ..

    Thanks,
    Sumit Sahu
    Last edited by Niheel; Jan 28 '21, 08:38 AM. Reason: signature, please read guidelines

    Comment

    • Joshuaschist
      New Member
      • Sep 2020
      • 10

      #3
      Run npm install create-react-app first, then "npm" shouldn't be added to the create-react-app again..

      Then create-react-app react-timer should run next after installation of npm i create-react-app

      Comment

      • anmoldhima5
        New Member
        • Jan 2021
        • 2

        #4
        First run
        npm cache clean -f

        then try with these command

        Install the global package.

        npm install create-react-app -g

        Create a new project called demo-app:

        create-react-app <Project Name>

        create-react-app demo-app

        References : How to create ReactJS Application

        Comment

        Working...