tojocky / node-printer

Native node.js printer
1.54k stars 443 forks source link

Error: dlopen ... Symbol not found ... #234

Closed semireg closed 6 years ago

semireg commented 6 years ago

I'm seeing a error when requiring/importing. This is on a Mac, 10.13.6, Electron 3.0, Node 10.11.0.

Everything was working fine... now this. I've tried reverting to a different commit on my project and I'm still seeing this issue. Has anyone encountered it before? Googling for similar issues isn't yielding helpful results. I wish I knew how I ended up breaking my build... šŸ‘Ž

internal/modules/cjs/loader.js:718
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: dlopen(/path/to/app/node_modules/printer/lib/node_printer.node, 1): Symbol not found: __Z8ReadPathRKN2v820FunctionCallbackInfoINS_5ValueEEE
  Referenced from: /path/to/app/node_modules/printer/lib/node_printer.node
  Expected in: flat namespace
 in /path/to/app/node_modules/printer/lib/node_printer.node
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/path/to/app/test.js:1:73)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
semireg commented 6 years ago

Doh! Disregard. ReadPath is a function I added for windows and now I'm trying to build on a Mac. I have to add stubs... or conditional compilation.