2
votes

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

ESOCKETTIMEDOUT

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] postinstall /usr/lib/node_modules/angular-cli/node_modules/node-sass node scripts/build.js

Binary found at /usr/lib/node_modules/angular-cli/node_modules/node-sass/vendor/linux-x64-51/binding.node Testing binary Bus error (core dumped) /usr/lib └── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/angular-cli/node_modules/chokidar/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 WARN @angular/[email protected] requires a peer of rxjs@^5.0.1 but none was installed. npm ERR! Linux 4.4.0-64-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "angular-cli" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: node scripts/build.js npm ERR! Exit status 135 npm ERR! npm ERR! Failed at the [email protected] postinstall script 'node scripts/build.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the node-sass package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node scripts/build.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-sass npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-sass npm ERR! There is likely additional logging output above.

5

5 Answers

0
votes

Prerequisites of Node & NPM version are not met,

As stated in the error log update your node & NPM Versions.

Make sure you have the latest version of node.js and npm installed.

Download latest Node JS version & You can upgrade npm via

npm ugrade npm@latest
0
votes

First run, node -v and npm -v and make sure that you have at least node 6.9.x and npm 3.x.x.

If this is fine with you, then you need to clean your npm cache.

Do this by running,

npm cache clean

Then run,

npm install -g @angular/cli
0
votes

I just followed the Quickstart guide of angular, installed node (v6.11.3) and npm and upgraded npm (to v5.4.2). But when I do

ng new my-app

I get a similar error message:

... Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-48_binding.node":

ESOCKETTIMEDOUT

...

Package install failed, see above.

Despite I can access github.com in my browser, I cannot download the file located at the given URL (neither in my browser nor on the command line). But here it comes: On my root server (different IP address, different ISP) I can download this file without any problems.

I renewed my internet connection several times in order to get a different internet IP address but it didn't work, either. At work, colleagues of mine had similar problems. Thus, I conclude that github overblocked some IP address ranges.

0
votes

It looks like you are behind a proxy, you should get binairy locally and tell npm where it is located:

See https://github.com/sass/node-sass#binary-configuration-parameters

Easiest is to download the file to your disk and tell npm where it is

-1
votes

Do this by running

sudo apt install ng-common

then run

npm install -g @angular/cli