Insert bindings for a specific environments for packages from NPM


#1

In my project I need to dynamically compile SASS via node-sass. So I install the node-sass meteor npm i node-sass --save. And every works OK while I’m in my dev machine (mac os).
But when I build with meteor build --architecture=os.linux.x86_32 the final bundle does not contain Linux bindings for node-sass.

Is it a bug or there are some magic need to be applied after/before the build?


#2

The only solution I found is to use Vagrant for all these builds that required cosscompiling.
Because the node-gyp is not friendly for crosscompiling from Mac to Linux.
Related question on Stackoverflow

So this is not a meteor problem.

UPD: or use https://github.com/tpoechtrager/osxcross