簡體   English   中英

我在創建 React 應用程序時遇到以下問題

[英]I am facing the issue below while creating a React app

PS F:\Programming Tutorials Videos\R Practice> npx create-react-app custom-hook
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 registry.npmjs.org
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\GALAXY COMPUTERS\AppData\Local\npm-cache\_logs\2023-01-06T17_33_28_552Z-debug-0.logtype here

我已經安裝了 node.js 最新版本,但問題仍然存在並且使用 inte.net Connection 我創建了 React App 為什么會這樣,當我沒有連接到 Inte.net 時它不會創建 React App

當您將create-react-appnpx命令一起使用時,它會連接到 your.network 並創建需要安裝依賴項的新項目,您的項目依賴這些依賴項,例如reactreact-dom等,因此它需要.network 連接。

暫無
暫無

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

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