簡體   English   中英

設置反應的問題

[英]Issues setting up react

即使我同時安裝了節點和 npm,我在設置 react 時遇到問題。

輸入:

npx create-react-app new-test-react --use-npm

導致以下錯誤:

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/@babel%2fhelper-plugin-utils failed, reason: getaddrinfo ENOTFOUND your_proxy_ip
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\abhin\AppData\Roaming\npm-cache\_logs\2021-02-03T06_40_10_273Z-debug.log

任何幫助將不勝感激。 非常感謝

看起來您在某些代理后面,這就是您無法遠程注冊的原因。 錯誤清楚地說明了這一點。

network request to https://registry.npmjs.org/@babel%2fhelper-plugin-utils failed, reason: getaddrinfo ENOTFOUND your_proxy_ip

使用這些命令正確設置代理配置

$ npm config set proxy http://<username>:<password>@<proxy-server-url>:<port>
$ npm config set https-proxy http://<username>:<password>@<proxy-server-url>:<port>

更多信息 - https://forum.freecodecamp.org/t/how-to-run-npm-behind-a-proxy-server-a-step-by-step-guide/19386

暫無
暫無

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

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