Search code examples
reactjsnpm-install

i have a probleme when i wan create a new project react with cmd npm init react-app my-app


C:\Users\lenovo>npm init react-app preparefm npm ERR! code ENOTFOUND npm ERR! syscall getaddrinfo npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND proxy.example.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: C:\Users\lenovo\AppData\Local\npm-cache_logs\2023-12-30T22_32_20_187Z-debug-0.log


Solution

  • I suggest you use vite. it's way better than create-react-app

    just type :

    npm create vite@latest

    then choose your app name, Select a framework, and then cd to your app and install the required modules by executing:

    npm i