【发布时间】:2022-11-29 20:56:57
【问题描述】:
我打算用 npm 创建一个新的 React 应用程序,但它不起作用,而且我每次尝试时都会遇到太多错误 有人能帮助我吗?:(
我在cmd中输入了这一行
npx create-react-app my-app
和错误:
npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno -4077
npm ERR! network read ECONNRESET
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\sobha\AppData\Local\npm-cache\_logs\2022-11-29T11_57_33_191Z-debug-0.log
Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file... node_modules
Deleting generated file... package.json
Deleting my-app/ from C:\Users\sobha\Desktop\react
Done.
【问题讨论】:
-
因为您的网络连接似乎有问题,如错误消息所述..
标签: javascript node.js reactjs frontend npm-install