$ cmake -DJAVASCRIPT_BINDING=ON .. $ make $ make install #necessary for plugin's $ cd javascript $ npm install --unsafe-perm
The latest SWIG library does not generate correct node 7.0.x code. To correct that at the moment you need to do two things:
You can build the JavaScript bindings inside docker, for that you can use the dockerfile, it is based on the dockerfile.
More details on SWIG's JavaScript bindings can be found at SWIG.
To include the node bindings simply use it with.
var yang = require("./index")