Skip to content

Commit d16a7c8

Browse files
committed
fix: specify build_from_source using env vars
Newer npm/yarn versions don't populate `process.env.npm_config_argv` resulting in `npm/yarn` installs hanging. This fixes the issue https://github.com/prebuild/node-gyp-build/blob/464e3881600de2107f35fd1c55afff232a768123/bin.js#L75
1 parent c3d4666 commit d16a7c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"tsconfig.json"
8383
],
8484
"scripts": {
85-
"install": "(npm run build.js || echo ok) && aminya-node-gyp-build --build-from-source",
85+
"install": "(npm run build.js || echo ok) && cross-env npm_config_build_from_source=true aminya-node-gyp-build",
8686
"clean": "shx rm -rf ./build ./lib/ ./prebuilds ./script/*.js ./script/*.mjs ./script/*.js.map ./script/*.mjs.map ./script/*.d.ts ./script/*.d.mts ./script/*.cjs ./scripts/*.cjs.map ./scripts/*.d.cts ./script/*.tsbuildinfo",
8787
"clean.release": "shx rm -rf ./build/Release",
8888
"clean.temp": "shx rm -rf ./tmp && shx mkdir -p ./tmp",

0 commit comments

Comments
 (0)