title: How to prevent node-gyp from downloading node-headers.tar.gz and node.lib from internet?
body: <p>node-gyp downloads following files from the Internet during installation and building of the native modules like iconv, ref, ffi, etc:<br>
  <a href="https://nodejs.org/download/release/v6.10.0/node-v6.10.0-headers.tar.gz" rel="noreferrer">https://nodejs.org/download/release/v6.10.0/node-v6.10.0-headers.tar.gz</a><br>
  <a href="https://nodejs.org/download/release/v6.10.0/win-x86/node.lib" rel="noreferrer">https://nodejs.org/download/release/v6.10.0/win-x86/node.lib</a><br>
  <a href="https://nodejs.org/download/release/v6.10.0/win-x64/node.lib" rel="noreferrer">https://nodejs.org/download/release/v6.10.0/win-x64/node.lib</a><br>
  <a href="https://nodejs.org/download/release/v6.10.0/SHASUMS256.txt" rel="noreferrer">https://nodejs.org/download/release/v6.10.0/SHASUMS256.txt</a>  </p>
  
  <p>How to make node-gyp to use these files from local folders, not from the Internet?  </p>
  
  <p>I've found the following solution:<br>
  1. Download <a href="https://nodejs.org/download/release/v6.10.0/node-v6.10.0-headers.tar.gz" rel="noreferrer">https://nodejs.org/download/release/v6.10.0/node-v6.10.0-headers.tar.gz</a><br>
  2. Unpack it to some local folder.<br>
  3. Create folder Release in this local folder.<br>
  4. Download file <a href="https://nodejs.org/dist/v6.10.0/win-x64/node.lib" rel="noreferrer">https://nodejs.org/dist/v6.10.0/win-x64/node.lib</a> into the folder Release.<br>
  5. Set property nodedir in .npmrc which will point to the folder with unpacked headers:<br>
  nodedir=D:\tools\node_src\node-v6.10.0-headers  </p>
  
  <p>Now npm installs packages and node-gyp builds native packages without downloading node headers and libs from the Internet.<br>
  Is it a correct approach?  </p>
  
  <p>I cannot find in the documentation that I should download node.lib and put it to the Release directory.<br>
  I decided to do it after analyzing the traces of node-gyp and code of node-gyp.<br>
  Is it possible to setup the location of node.lib using some npm_config_xxx property?  </p>