skip to Main Content

I entered this command in terminal npm install create-react-app my-app
and getting this issue.Not able to create project

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git –no-replace-objects ls-remote git://github.scm.corp.ebay.com/cubejs/cluster2.git
npm ERR! fatal: unable to look up github.scm.corp.ebay.com (port 9418) (Name or service not known)

I tried these options
npm config set legacy-peer-deps true

npm install aframe

3

Answers


  1. The command to create new react project is npx create-react-app my-app. Assuming you already have nodejs installed.
    I hope it helps.

    Login or Signup to reply.
  2. Please your nodejs installed first.
    This is the command to check your node version
    node -v
    You can try another way to create a new react project

    npx

    npx create-react-app my-app
    

    npm

    npm init react-app my-app
    

    available in npm 6+

    yarn

    yarn create react-app my-app
    

    available in Yarn 0.25+

    Login or Signup to reply.
  3. I would suggest switching to Vite instead. (This is how I create my projects)

    npm create vite@latest
    

    Then select your required framework and language (TS/JS)

    [email protected]
    Ok to proceed? (y) y
    ✔ Project name: … sample
    ✔ Select a framework: › React
    ? Select a variant: › - Use arrow-keys. Return to submit.
    ❯   TypeScript
        TypeScript + SWC
        JavaScript
        JavaScript + SWC
    

    I think create-react-app is either deprecated or about to be deprecated and might contain dependences that are not updated. Anyhow it should be a good time to switch to a different tooling for new react projects.

    For a detailed guide visit the Vite’s get started page.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search