Home > Enterprise >  I am new to react, previously I created react apps but not trying to create a react app but after ta
I am new to react, previously I created react apps but not trying to create a react app but after ta

Time:12-02

Previously used this command;

npx create-react-app 'project_name' -but now this is giving error, used other commands as;

npx create-react-app@latest 'project_name' npm create-react-app 'project_name'

node version is: v16.17.0 npm version: 9.1.2

same error, then tried to use uninstall react globally and installed it again and tried npx create-react-app 'project_name'

and having same error again..

npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/@typescript-eslint/typescript-estree: aborted
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:\Users\ST\AppData\Local\npm-cache\_logs\2022-11-29T19_03_34_604Z-debug-0.log

only packages.json file is created and at failure it is also deleted...

As this command was working fine just a few days ago npx create-react-app

I am new to this framework if there is a mistake kindly help me along..

CodePudding user response:

It clearly states that your error comes from a network connection. It may be caused by a VPN. Anyway, if you are new to React and if I may suggest a better solution for you to start a project... CRA is outdated nowadays. Use Vite. Just run this

npm create vite@latest some-react-app-name --template react
  • Related