node-gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. It contains a vendored copy of the gyp-next project that was previously used by the Chromium team, extended to support the development of Node.js native addons. Note that node-gyp is not used to build Node.js itself. Multiple target versions of Node.js are supported (i.e. 0.8, ..., 4, 5, 6, etc.), regardless of what version of Node.js is actually installed on your system (node-gyp downloads the necessary development files or headers for the target version). node-gyp requires that you have installed a compatible version of Python, one of: v3.6, v3.7, v3.8, or v3.9. If you have multiple Python versions installed, you can identify which Python version node-gyp should use. A binding.gyp file describes the configuration to build your module, in a JSON-like format. This file gets placed in the root of your package, alongside package.json.
Features
- The same build commands work on any of the supported platforms
- Supports the targeting of different versions of Node.js
- Use the form npm_config_OPTION_NAME for any of the command options available
- Avilable for Windows and Mac
- The docs directory contains additional documentation on specific node-gyp topics that may be usefu
- node-gyp is not used to build Node.js itself