Search code examples
windowsnpmnode-sass

Installing node-sass stuck on install.js


Whenever I try to install node-sass via npm, this is what happens:

> node-sass@3.8.0 install C:\temp1\node_modules\node-sass
> node scripts/install.js

Terminate batch job (Y/N)? 

It gets stuck on the install.js line on a Windows 7 Machine. Any ideas?


Solution

  • in my case, wait a long time, you will see a warn Cannot download "https://github.com/sass/node-sass/releases/download/v3.8.0/win32-x64-46_binding.node":

    it mean your network are terrible or some gateway refused your access to github, like my country's GFW

    so you can use a VPN to solve it

    or go to this link and download this filehttps://github.com/sass/node-sass/releases/download/v3.8.0/win32-x64-46_binding.node

    then put it in your path like D:\xxx\node_modules\node-sass\vendor\win32-x64-46\binding.node

    then in this pwd \node_modules\node-sass\scripts> and run node ./install.js

    the download file maybe different for your different environment

    just see the warning

    but I fixed it in this way.

    Best Wishes.