reactjs - 无法在 vs 代码中使用 npx 安装 React

在 vs 代码中使用 npx 安装 React 时出现此错误

npm ERR! network Socket timeout
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 '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\hpw\AppData\Local\npm-cache\_logs\2022-05-15T09_00_22_661Z-debug-0.log

Aborting installation.
  npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.```


Can anyone tell how to fix it ?

回答1

尝试这个 :

npx create-react-app@latest app-name

相似文章

随机推荐

最新文章