簡體   English   中英

我是 React 新手,之前我創建了 React 應用程序但沒有嘗試創建 React 應用程序但是花了很長時間后出現錯誤

[英]I am new to react, previously I created react apps but not trying to create a react app but after taking a long time it is giving an error

以前使用過這個命令;

npx create-react-app 'project_name' - 但現在這是錯誤的,使用其他命令作為;

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

節點版本為:v16.17.0 npm 版本:9.1.2

同樣的錯誤,然后嘗試使用全局卸載反應並再次安裝並嘗試npx create-react-app 'project_name'

再次出現同樣的錯誤..

npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/@typescript-eslint%2ftypescript-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

僅創建 packages.json 文件,失敗時也將其刪除...

因為這個命令幾天前工作正常npx create-react-app

如果有錯誤,我是這個框架的新手,請幫助我。

它明確指出您的錯誤來自網絡連接。 這可能是由 VPN 引起的。 不管怎樣,如果你是 React 的新手,如果我可以為你建議一個更好的解決方案來開始一個項目……CRA 現在已經過時了。 使用維特。 運行這個

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM