powershell - 我尝试使用 powershell 安装 yarn 包。首先我输入了 npm install -g yarn 然后我输入了 yarn install。但我收到以下错误
问题描述
我尝试使用管理权限打开 Powershell 并输入 set-executionpolicy remote signed 然后再次尝试,但我仍然遇到错误。
yarn install
yarn install v1.22.11
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning react-scripts > webpack-dev-server > sockjs > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.9.1.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\Win8\\Documents\\Masters Software Engineering\\upstac-ui\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
解决方案
这对我有用,我制作了一个文件并将其命名
.yarnrc
并将其放入其中
网络超时 500000
看一看:
推荐阅读
- android - Android Google Play 订阅不自动更新
- angular - 如何使用 Angular 测试库测试 ng-select?
- ruby-on-rails - Rails 5:如何在 Rails 控制台中更改日志级别?
- node.js - 如何解决 TypeError: config.query is not a function
- json - Laravel 多对多关系:Pivot VS JSON
- java - java - 如何将json解析为对象扩展HashMap在java中使用fastjson?
- r - 您是否必须从多元正态模拟聚类数据?
- cypress - Accessing Cypress results outside of the application to display on a Webpage
- javascript - 角度点击函数发送两个参数
- ruby-on-rails - Rails 6迁移到对不同于rails标准的列的引用