gyp info it worked if it ends with ok
gyp info using node-gyp@3.7.0
gyp info using node@8.4.0 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/tmp/segfault-handler/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.node-gyp/nsolid-8.4.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.node-gyp/nsolid-8.4.0',
gyp info spawn args '-Dnode_gyp_dir=/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.node-gyp/nsolid-8.4.0/<(target_arch)/nsolid.lib',
gyp info spawn args '-Dmodule_root_dir=/tmp/segfault-handler',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/tmp/segfault-handler/build'
CXX(target) Release/obj.target/segfault-handler/src/segfault-handler.o
SOLINK_MODULE(target) Release/obj.target/segfault-handler.node
COPY Release/segfault-handler.node
make: Leaving directory `/tmp/segfault-handler/build'
gyp info ok
require('./build/Release/segfault-handler.node').registerHandler('test')
^
TypeError: require(...).registerHandler is not a function
at [eval]:1:50
at ContextifyScript.Script.runInThisContext (vm.js:44:33)
at Object.runInThisContext (vm.js:116:38)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:625:30)
at evalScript (bootstrap_node.js:486:27)
at startup (bootstrap_node.js:171:9)
at bootstrap_node.js:632:3
The binary
segfault-handler.node
is not building correctly on my ubuntu 14.04, it's showing the zmq API instead of registerHandler/causeSegfaultcat /etc/lsb-release
node-gyp rebuild
node -e "require('./build/Release/segfault-handler.node').registerHandler('test')"
node -e "console.log(require('./build/Release/segfault-handler.node'))"
The same happens building using
npm install segfault-handler