纱线安装角度

时间:2019-10-24 02:33:19

标签: angular npm yarn

我克隆了角度存储库,但是当尝试使用推荐的命令 yarn 下载依赖项时,出现错误:

错误文本输出控制台:

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.

1 个答案:

答案 0 :(得分:0)

此错误有解决方法:

发生意外错误:
https://saucelabs.com/downloads/sc-4.5.1-linux.tar.gz:请求失败 \“ 406不可接受\”“。

步骤1:从packages.json

中删除以下两个脚本
   1. `preinstall`

   2. `presetup`

步骤2:使用npm和命令npm install来安装软件包

步骤3:现在,运行yarn setup命令以安装所有依赖项,样板文件,stackblitz,zips并在文档上运行dgeni。

第4步:最后运行命令yarn start,暂时解决此问题