Configuration environment is also a door knowledge, anyway, EVERY time I can match the environment out of a pile of problems, hope all students have patience, and finally will solve the ~

Ps: If you can’t solve the problem, you can use the method of drinking poison to quench thirst

An error

> [email protected] install E:\node_modules\gulp-sass\node_modules\node-sass > node scripts/install.js Downloading binary The from HTTP: / / https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node / / an error of the link itself always Download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_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:8080Copy the code

Solution Node-sass installation failure

The installation of Node-sass failed because the. Node file could not be downloaded due to network restriction

Solution 1

We copy the required file download path to the browser, and then use the browser to download the file.

  1. Copy the. Node file download link from the node command line and open the download file in your browser

    Github.com/sass/node-s…

  2. After the file is downloaded successfully, enter the following command in the command line tool:

    Set SASS_BINARY_PATH= Path where. Node resides

Set the SASS_BINARY_PATH environment variable to tell the program to use the local. Node file without downloading it from the web

  1. When the configuration is complete, re-enter the command:

    npm i node-sass -D –verbose

The Node-sass installation was successful

Solution 2

Use Taobao Mirror

 npm set sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
Copy the code

or

npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install node-sass
Copy the code
Method 3 (If you have installed the wall climbing software)

Assuming that your wall-scaling software has enabled a third-party server 127.0.0.1:1080 on your local machine, you can install Nod-Sass by simply following these steps (if you have enabled PAC mode instead of global mode, That would also require adding s3.Amazonaws.com to the PAC list) :

NPM config set proxy http://127.0.0.1:1080 NPM I node-sassCopy the code

Delete the HTTP proxy after the download is complete

npm config delete proxy
Copy the code

The above solution to node-sass installation

Set pieces

The author thinks that the successful development of the smooth road,…. Bower failed…. An error is as follows

E:\bower install module.js:487 throw err; ^ Error: Cannot find module 'internal/fs' at Function.Module._resolveFilename (module.js:485:15) at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at evalmachine.<anonymous>:40:20 at Object.<anonymous> (C:\Users\scar\AppData\Roaming\npm\node_modules\bower\lib\node_modules\graceful-fs\fs.js:11:1) at Module._compile (module.js:569:30) at Object.Module._extensions.. js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12)Copy the code

There are two reasons why module cannot be found after checking the article: 1. It is not installed; 2

npm list graceful-fs
Copy the code

image.png

The problem I found was that the package was repeatedly installed. Take a closer look, maybe my global graceful-FS wasn’t installed properly

npm install -g graceful-fs
Copy the code

Success!

Author: scarqin links: www.jianshu.com/p/a0641a990… The copyright belongs to the author, any form of reprint please contact the author to obtain authorization and indicate the source.