Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set tarball url of node-gyp via environment variable

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?

like image 620
richard Avatar asked Aug 29 '13 06:08

richard


1 Answers

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

like image 50
richard Avatar answered Sep 30 '22 16:09

richard