错误,加密错误,aaaaargh"/>
不能使用 npm 或 Yarn。超时错误,加密错误,aaaaargh
我在 VSCode 中打开了一个空目录。我尝试创建一个反应应用程序,但终端只是冻结。我无法安装任何软件包。 npm 和 yarn 都以相同的错误结束:
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to failed, reason: connect ETIMEDOUT 2606:4700::6810:1223:80
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\fluva\AppData\Local\npm-cache\_logs\2023-04-28T03_27_08_973Z-debug-0.log
我能够运行
npm init -y
我试图在 VSCode 中打开另一个应用程序,它给了我这个错误:
Error: error:0308010C:digital envelope routines::unsupported
我用过的:
$env:NODE_OPTIONS = "--openssl-legacy-provider"
- 然后我运行 yarn start 并且应用程序运行了。
所以,现在,我无法创建任何新的 React 应用程序,当我在正在运行的 React 应用程序中时,我无法安装任何新包。它通常会冻结在这个:
| idealTree:tryagain: sill idealTree buildDeps
没有代理。据我所知,没有防火墙干扰。我禁用了所有安全测试并得到了相同的结果。我卸载了 Node,然后重新安装。我已经卸载了 Openssl 并重新安装了 1.1.1.
节点 v18.16.0
npm 9.6.0
openssl版本 OpenSSL 1.1.1t 2023 年 2 月 7 日
纱-v 1.22.19
Windows 10
XXXXXXX - PS - XXXXXXX 这些都在我的桌面上。这里的关键因素是它也发生在我的笔记本电脑上。所以我认为这是网络问题???沮丧!
回答如下:如果您的网络连接较弱,在下载像
react
这样的大包时可能会出现超时错误。尝试在您的项目目录中添加一个.npmrc
文件并添加此设置:
timeout=120000 // or even higher if you have terrible connection
然后尝试安装你的包。
更多推荐
不能使用 npm 或 Yarn。超时错误,加密错误,aaaaargh
发布评论