Question

I am migrating from node-waf build to node-gyp build system for node native addons. node-gyp says it supports multiple target version, but I couldn't find how to specify target node version while using node-gyp.

Problem is, my system has node v0.10.3 installed, but I need to build my native addon for node version 0.8.20. When I build the add-on it uses the headers for v0.10.3, which ofcourse gives errors.

I can't find how can I specify the node version while configuring / building using node-gyp.

Please help.

Was it helpful?

Solution

The solution is to specify --target argument while configuring using node-gyp. for ex.

node-gyp --arch=<WHATEVER> --target=v0.8.20 configure
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top