Undefined symbol
I attempted to use a neon package I wrote in an Electron app, it won't compile.
App threw an error during load
[1] Error: ~/electron-app/node_modules/neon-package/native/index.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE
[1] at process.func [as dlopen] (electron/js2c/asar.js:140:31)
[1] at Object.Module._extensions..node (internal/modules/cjs/loader.js:1034:18)
[1] at Object.func [as .node] (electron/js2c/asar.js:140:31)
[1] at Module.load (internal/modules/cjs/loader.js:815:32)
[1] at Module._load (internal/modules/cjs/loader.js:727:14)
[1] at Function.Module._load (electron/js2c/asar.js:769:28)
[1] at Module.require (internal/modules/cjs/loader.js:852:19)
[1] at require (internal/modules/cjs/helpers.js:74:18)
[1] at Object.<anonymous> (~/electron-app/node_modules/neon-package/lib/index.js:3:17)
[1] at Module._compile (internal/modules/cjs/loader.js:967:30)
Node version: 12.16.3 NPM version: 6.14.7
@GiraffeKey Neon, currently, requires being compiled and linked against the same version of node it is executed in. Electron ships it's own version of node. It's necessary to jump through a couple extra hoops to ensure that the neon module is compiled against the correct version of node.
The electron-build-env npm helper package will discover the version of node electron is using and set the appropriate environment variables.
https://github.com/neon-bindings/neon/blob/master/test/electron/package.json#L9
Let me know if that resolves the issue. Cheers!