strongloop / modern-syslog

modern-syslog
Other
49 stars 19 forks source link

Binding.gyp fix #37

Closed hsahin closed 5 years ago

hsahin commented 5 years ago

There is an issue where npm cannot find functions defined in this package.

I get this output:

Error: /node_modules/modern-syslog/build/Release/core.node: undefined symbol: _ZNK2v86String9WriteUtf8EPciPii at Object.Module._extensions..node (internal/modules/cjs/loader.js:800:18) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Module.require (internal/modules/cjs/loader.js:666:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (/usr/lib/node_modules/webotate/node_modules/modern-syslog/index.js:9:12) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Module.require (internal/modules/cjs/loader.js:666:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (/usr/lib/node_modules/webotate/src/middleware/logger.ts:1:1) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32)

Including the core as a library in include_dirs solves this issue.

slnode commented 5 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

sam-github commented 5 years ago

Could you describe how to reproduce the problem you see?

Your change failed every platform in CI, and I've not had any other reports of the gyp not working, so this might be something specific to your env.

sam-github commented 5 years ago

@slnode ok to test

hsahin commented 5 years ago

This was an issue in the system I used which showed a different NODE version then it should have. The problem is gone now, thnx for the help!