Gathering detailed insights and metrics for node-gyp-build-optional-packages
Gathering detailed insights and metrics for node-gyp-build-optional-packages
Gathering detailed insights and metrics for node-gyp-build-optional-packages
Gathering detailed insights and metrics for node-gyp-build-optional-packages
Build tool and bindings loader for node-gyp that supports prebuilds
npm install node-gyp-build-optional-packages
Typescript
Module System
Node Version
NPM Version
98.1
Supply Chain
85.7
Quality
76.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
116 Stars
95 Commits
39 Forks
3 Watchers
3 Branches
24 Contributors
Updated on Apr 21, 2025
Latest Version
5.2.2
Package Id
node-gyp-build-optional-packages@5.2.2
Unpacked Size
14.46 kB
Size
5.58 kB
File Count
8
NPM Version
9.8.1
Node Version
20.6.0
Published on
Jun 09, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
3
Build tool and bindings loader for
node-gyp
that supports prebuilds.
npm install node-gyp-build
Use together with prebuildify
to easily support prebuilds for your native modules.
Note. Prebuild names have changed in
prebuildify@3
andnode-gyp-build@4
. Please see the documentation below.
node-gyp-build
works similar to node-gyp build
except that it will check if a build or prebuild is present before rebuilding your project.
It's main intended use is as an npm install script and bindings loader for native modules that bundle prebuilds using prebuildify
.
First add node-gyp-build
as an install script to your native project
1{ 2 ... 3 "scripts": { 4 "install": "node-gyp-build" 5 } 6}
Then in your index.js
, instead of using the bindings
module use node-gyp-build
to load your binding.
1var binding = require('node-gyp-build')(__dirname)
If you do these two things and bundle prebuilds with prebuildify
your native module will work for most platforms
without having to compile on install time AND will work in both node and electron without the need to recompile between usage.
Users can override node-gyp-build
and force compiling by doing npm install --build-from-source
.
Prebuilds will be attempted loaded from MODULE_PATH/prebuilds/...
and then next EXEC_PATH/prebuilds/...
(the latter allowing use with zeit/pkg
)
If so desired you can bundle more specific flavors, for example musl
builds to support Alpine, or targeting a numbered ARM architecture version.
These prebuilds can be bundled in addition to generic prebuilds; node-gyp-build
will try to find the most specific flavor first. Prebuild filenames are composed of tags. The runtime tag takes precedence, as does an abi
tag over napi
. For more details on tags, please see prebuildify
.
Values for the libc
and armv
tags are auto-detected but can be overridden through the LIBC
and ARM_VERSION
environment variables, respectively.
MIT
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 10/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More