node-gyp is a cross-platform command-line tool for compiling native addon modules for Node.js.
The tool solves the problem of building C and C++ native extensions that integrate with Node.js across different operating systems and Node.js versions. It works by providing unified build commands that abstract away platform-specific compilation details. The tool contains a vendored copy of the gyp-next project, which was originally developed by the Chromium team and has been extended specifically for Node.js native addon development. It automatically downloads the necessary development files and headers for the target Node.js version being used.
Developers should choose this tool when they need to build native addons for Node.js and want a consistent build experience across Unix, macOS, and Windows platforms. It suits projects that require performance-critical components written in C or C++, or that need to interface with existing native libraries. The tool supports all current and long-term support versions of Node.js, making it suitable for projects targeting multiple Node.js releases. Setup requirements vary by platform: Unix systems need Python, make, and a C/C++ compiler toolchain; macOS requires Python and Xcode Command Line Tools; Windows requires Python and Visual C++ Build Environment, with additional considerations for ARM64 targets.
The project maintains active engagement with dependency management, as evidenced by explicit version requirements for Python compatibility. Development activity shows responsiveness to platform-specific needs, including detailed configuration guidance for Windows ARM64 support and flexible Python version detection through multiple configuration methods. The tool receives ongoing maintenance to support current Node.js releases and evolving platform toolchain requirements.