create-react-app 无法安装React应用

nafvub8i  于 3个月前  发布在  React
关注(0)|答案(7)|浏览(105)

在E盘创建一个新的React应用。
正在安装包,这可能需要几分钟。
正在使用cra-template安装react、react-dom和react-scripts。
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network request to http://registry.npmjs.org/schema-utils 失败,原因:套接字超时
npm ERR! network This is a problem related to network connectivity.
npm ERR! network 在大多数情况下,您可能位于代理后面或网络设置不佳。
npm ERR! network
npm ERR! network 如果您位于代理后面,请确保“proxy”配置正确。参见:'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\abhi\AppData\Local
pm-cache_logs\2022-04-27T11_45_58_092Z-debug-0.log
中止安装。
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template 已失败。
删除生成的文件... package.json
从E盘删除shopcart/文件夹。
完成。
npm ERR! code 1
npm ERR! path E:
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c create-react-app "shopcart"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\abhi\AppData\Local
pm-cache_logs\2022-04-27T11_45_47_614Z-debug-0.log

55ooxyrt

55ooxyrt1#

这发生在我身上,我恢复到了npm版本6.14.16。

y3bcpkx1

y3bcpkx12#

这可能是由于网络问题导致的。请尝试重新连接到您的网络,并在稳定的互联网连接下再次尝试。

sf6xfgos

sf6xfgos3#

这对我有用:我原本使用的是Node.js 16.15.0版本,后来升级到了18.1.0版本

bbuxkriu

bbuxkriu4#

对我不起作用。我的错误是:
Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template... npm ERR! code ERR_SOCKET_TIMEOUT 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 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\Md Rana\AppData\Roaming\npm-cache\_logs\2023-02-01T16_50_30_581Z-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... node_modules Deleting generated file... package.json Deleting contact-app/ from E:\Practice\React

am46iovg

am46iovg5#

我也有这个问题。

mccptt67

mccptt676#

我使用了它并修复了它。

7gcisfzg

7gcisfzg7#

创建一个新的React应用在D:\assignment\Anchorblock-assignment\users-stack。
安装包。这可能需要几分钟。
使用cra-template安装react, react-dom, 和 react-scripts。...
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/tailwindcss : 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
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\moinu\AppData\Local
pm-cache_logs\2023-11-03T04_46_09_582Z-debug-0.log
中止安装。
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template 已失败。
删除生成的文件... package.json
从 D:\assignment\Anchorblock-assignment 删除 users-stack/
完成。

相关问题