unabel 使用 create-react-app 创建新项目

发布于 2025-01-10 03:24:42 字数 1432 浏览 0 评论 0原文

我刚刚成功安装了 creat-react-app。但是,当我创建一个像下面的命令一样的新项目时,发生了错误,你能给我一个建议吗?

npm install -g yarn
yarn global add create-react-app
create-react-app myapp

我收到此错误

PS C:\Users\ZAKARIA\Desktop\react> create-react-app my-app

Creating a new React app in C:\Users\ZAKARIA\Desktop\react\my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno ECONNRESET
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/@typescript-eslint%2fparser: 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\ZAKARIA\AppData\Local\npm-cache\_logs\2022-02-25T19_22_40_652Z-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... package.json
Deleting my-app/ from C:\Users\ZAKARIA\Desktop\react
Done.

** 我删除了缓存纱线,并且收到了相同的错误。 **

I've just finished installing creat-react-app successfully.But ,when I creat a new project like below command ,error happens ,Could you please give me a recommandation ?

npm install -g yarn
yarn global add create-react-app
create-react-app myapp

I get this error

PS C:\Users\ZAKARIA\Desktop\react> create-react-app my-app

Creating a new React app in C:\Users\ZAKARIA\Desktop\react\my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno ECONNRESET
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/@typescript-eslint%2fparser: 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\ZAKARIA\AppData\Local\npm-cache\_logs\2022-02-25T19_22_40_652Z-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... package.json
Deleting my-app/ from C:\Users\ZAKARIA\Desktop\react
Done.

** I deleted cache yarn and I got the same error. **

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文