node -gyp downloads the following files from the Internet during the installation and creation of its own modules, such as iconv, ref, ffi, etc.:https://nodejs.org/download/release/v6.10.0/node-v6.10.0-headers.tar.gzhttps://nodejs.org/download/release/v6.10.0/win-x86/node.libhttps://nodejs.org/download/release/v6.10.0/win-x64/node.libhttps://nodejs.org/download/release/v6.10.0/SHASUMS256.txt
How to make node -gyp use these files from local folders and not from the Internet?
I found the following solution:1. Download https://nodejs.org/download/release/v6.10.0/node-v6.10.0-headers.tar.gz2. Unzip it to a local folder.3. Create the Release folder in this local folder.4. Download the file https://nodejs.org/dist/v6.10.0/win-x64/node.lib to the Release folder.5. Set the nodedir property to .npmrc, which will point to the folder with the unpacked headers:nodedir = D: \ tools \ node_src \ node -v6.10.0-headers
Now npm installs packages and node -gyp creates its own packages without downloading node headers and libraries from the Internet.Is this the right approach?
I cannot find in the documentation that I have to download node.lib and put it in the Release directory.I decided to do this after analyzing the traces of node -gyp and the node -gyp code.Is it possible to set the location of node.lib using some npm_config_xxx property?
As shown here, you can use the -tarball option for node -gyp https://github.com/nodejs/node-gyp/issues/1133
Source: https://habr.com/ru/post/1265302/More articles:Many locks with a mutex and the ability to lock - c ++Font - amazing turn and carriage stacked on top of each other - csscoverage in parallel for django tests - djangoAVAudioSession endInterruption () returns NSOSStatusErrorDomain - iphoneHow to determine row equality across multiple lines in a fully vectorized way? - pythonPrinting the size (megabytes) of data in Swift 3.0 - iosI am having problems authenticating with AD on Windows machines from my powerful host. "Server not found in Kerberos database" on Ubuntu 16.10 - authenticationSaving extremely small values ββin Amazon Redshift - sqlHow to update Python version in root environment in cond - pythonHow to use MockMvcResultMatchers.jsonPath - javaAll Articles