skip to Main Content

npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to http://redistry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND proxy.company.com
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyoussefAppDataLocalnpm-cache_logs2023-07-20T08_52_11_671Z-debug-0.log

npx create-react-app aosef-app

2

Answers


  1. As the error noted: ‘This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings.’

    Login or Signup to reply.
  2. Solutions:

    1- check if your network is stable or (network problem related to proxy/VPN).
    if you are using proxy/VPN try to turn them off and check.

    2- Use Vite instead of Create React App

    It’s preferred to use Vite instead of Create React APP

    "Create React APP has been deprecated by the React team"

    Vite: https://vitejs.dev/

    React docs are recommended Vite now for creating new React Apps if you will use vanilla React without any framework like (Next js, Remix and Gatsby)

    Check this: https://react.dev/learn/start-a-new-react-project

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