Question:
project dependent on the gulp-sass: ~ 2.1.1 the older version, so that the npm install time has been reported about the error:
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-64_binding.node":
HTTP error 404 Not Found
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
Solution:
1. Many online article said that the issue is mirrored aspects, and therefore will switch to Taobao image:
npm install -g cnpm --registry=https://registry.npm.taobao.org
2. Some people also say that directly to the node-sass official website to download the corresponding version for local installation:
# 1. Download the corresponding version to the local disk
# 2. Set sass path
set SASS_BINARY_PATH = local disk path
# 3. Install
npm i node-sass -D --verbose
However the above methods can not solve my problem, because the official website has no sass v3.13.1 this version, we see later in this article https://github.com/SharePoint/sp-dev-fx-webparts/issues/501, the perfect solution to my problem.
1. 进入 C:\Windows\System32 找到cmd.exe程序,右键以管理员身份运行
2. 输入:npm install --global --production windows-build-tools
3. Wait for the installation to complete
----------------
Original link: https: //blog.csdn.net/y_k_y/article/details/86535268