Add support for node-pre-gyp
- Version:
- Platform:
- Subsystem:
Many native modules use node-pre-gyp to download pre-built binary from release servers. However, today pre-built binaries for all native modules are compiled using node-v8. If we try to install these modules using node-chakracore, it will still download the pre-built binary and when ran unit test for those modules they will fail because pre-built binaries were compiled using node-v8 and we are trying to use it for node-chakracore. Evaluate what work is needed in node-pre-gyp side to add support to detect the underlying engine and then decide whether to download the binary or not.
@bzoz mentioned offline that setting environment variable npm_config_build_from_source or using npm set build_from_source should force building for source. Might be worth adding this to node-pre-gyp if jsEngine == 'chakracore'.
Related work : https://github.com/mapbox/node-pre-gyp/pull/311