简体   繁体   English

纱线安装 Angular

[英]yarn install Angular

I clone the angular repository but when trying to download the dependencies with the recommended command yarn I have an error:我克隆了 angular 存储库,但是在尝试使用推荐的命令yarn下载依赖项时出现错误:

Error text output console:错误文本 output 控制台:

yarn install v1.18.0
$ node tools/yarn/check-yarn.js
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "graceful-fs@4.2.2" is incompatible with requested version "graceful-fs@~3.0.2"
warning Resolution field "graceful-fs@4.2.2" is incompatible with requested version "graceful-fs@^3.0.0"
warning Resolution field "graceful-fs@4.2.2" is incompatible with requested version "graceful-fs@~1.2.0"
[3/5] Fetching packages...
error An unexpected error occurred: "https://saucelabs.com/downloads/sc-4.5.1-linux.tar.gz: Request failed \"406 Not Acceptable\"".
info If you think this is a bug, please open a bug report with the information provided in "/home/andrusd/Escritorio/Files/angular/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

There is an workaround for this error:此错误有一个解决方法:

An unexpected error occurred:一个意料之外的问题发生了:
" https://saucelabs.com/downloads/sc-4.5.1-linux.tar.gz : Request failed \"406 Not Acceptable\"". https://saucelabs.com/downloads/sc-4.5.1-linux.tar.gz :请求失败“406 不可接受”。

Step 1: Remove following two scripts from packages.json第 1 步:从packages.json中删除以下两个脚本

   1. `preinstall`

   2. `presetup`

Step 2: Install packages using npm with command npm install第 2 步:使用npm和命令npm install安装软件包

Step 3: And now, run the yarn setup command to install all the dependencies, boilerplate, stackblitz, zips and run dgeni on the docs.第 3 步:现在,运行yarn setup命令来安装所有依赖项、样板文件、stackblitz、zip 并在文档上运行 dgeni。

Step 4: Finally run the command yarn start and this the solution for the time being第 4 步:最后运行命令yarn start ,这是暂时的解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM