The `ninja-build` npm package serves as a lightweight Node.js wrapper for the Ninja build system. Its primary function is to simplify the inclusion and execution of the Ninja binary (version 1.3.4) within Node.js projects, abstracting away the manual download and compilation steps. Currently at version 0.1.5, this package is largely unmaintained, with its last update occurring many years ago. It bundles an extremely old version of Ninja (1.3.4, whereas modern Ninja is significantly higher). While initially designed for ease of use within Node.js workflows, its lack of updates, especially regarding the bundled Ninja version and explicit lack of Windows support, severely limits its utility in modern development environments. The package has no active release cadence.
npm install ninja-buildVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically find and execute the bundled Ninja binary within a Node.js script using `child_process`, printing its help output.
Consider using a newer method to acquire Ninja (e.g., system package manager, direct download, or a more actively maintained npm package) if modern Ninja features or compatibility are required. This `ninja-build` package is not suitable for modern projects.
Do not use this package on Windows. Users on Windows should install Ninja via other means (e.g., Chocolatey, MSYS2, or official downloads) or use a Linux/macOS environment.
Evaluate alternatives for managing the Ninja build system in your project that are actively maintained and provide a current version of Ninja.
Always install `ninja-build` as a development dependency (`npm install --save-dev ninja-build`) and access the binary via its `node_modules` path or a `package.json` script.
Run `npm install ninja-build` again. Verify the file actually exists at the specified path (`./node_modules/ninja-build/bin/ninja`) after installation. Check `npm config get platform` and `npm config get arch` for compatibility issues.
This package is explicitly not supported on Windows. Install Ninja through a Windows-native method (e.g., Chocolatey) or use a Linux/macOS environment that has `bash` installed.
The `ninja-build` package does not expose a JavaScript module. To get the path to the binary, use `require.resolve('ninja-build/bin/ninja')` and then execute it via `child_process`. Do not use `import` or direct `require` on the package name itself.No dependency data recorded yet.