jhipster yarn install 编译报node-sass下载错误

报错信息如下

> [email protected] install /home/deepin/Documents/code/java/hengbang/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.2/linux-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/linux-x64-57_binding.node": 

ETIMEDOUT

Timed out attemping to establish a remote connection

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> [email protected] install /home/deepin/Documents/code/java/hengbang/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r497674! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
npm WARN [email protected] requires a peer of popper.js@^1.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @schematics/[email protected] requires a peer of @angular-devkit/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @schematics/[email protected] requires a peer of @angular-devkit/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @schematics/[email protected] requires a peer of rxjs@^5.5.6 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

说的很清楚,说是从github下载东西TIMEOUT,要你设置代理。

解决办法

  1. 设置代理

  2. 使用淘宝的镜像

SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass

参考: https://github.com/lmk123/blog/issues/28

你可能感兴趣的:(jhipster yarn install 编译报node-sass下载错误)