简体   繁体   中英

yarn install Angular

I clone the angular repository but when trying to download the dependencies with the recommended command yarn I have an error:

Error text output console:

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\"".

Step 1: Remove following two scripts from packages.json

   1. `preinstall`

   2. `presetup`

Step 2: Install packages using npm with command 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.

Step 4: Finally run the command yarn start and this the solution for the time being

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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