Question

I want to use custom node tarball to build node modules via node-gyp, is there any way to set it via environment variable or some config files for node-gyp or npm?

Was it helpful?

Solution

ok, I figure it out now, node-gyp currently doesn't support to set tarball url, but we can set disturl via environment variable or config files.

in ~/.npmrc, we can add disturl=... to set disturl. also we can set npm_config_disturl as a environment variable and it will be treated as a npm config variable.

with the disturl, node-gyp will get tarball url

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top