blackbeam / poppler-simple

A simple javascript interface to poppler library
Apache License 2.0
37 stars 14 forks source link

symbol not found in flat namespace (__ZTV9MemStream) #49

Open zirho opened 2 years ago

zirho commented 2 years ago

Hey guys,

I get an error.

My machine is mac silicon M1 pro macos 12.5 node v16.16.0

I am not sure if this could be related.

Any help would be appreciated.

Thanks

$ ts-node src/cli.ts
Error: dlopen(/Users/yj/projects/aa/cli-pdf2img-test/node_modules/poppler-simple/build/Release/poppler.node, 0x0001): symbol not found in flat namespace (__ZTV9MemStream)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /Users/yj/projects/aa/cli-pdf2img-test/node_modules/poppler-simple/lib/poppler.js:18:22
    at Object.<anonymous> (/Users/yj/projects/aa/cli-pdf2img-test/node_modules/poppler-simple/lib/poppler.js:106:3)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/yj/projects/aa/cli-pdf2img-test/src/logic.ts:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module.m._compile (/Users/yj/projects/aa/cli-pdf2img-test/node_modules/ts-node/src/index.ts:1455:23) {
  code: 'ERR_DLOPEN_FAILED'
}
error Command failed with exit code 1.
zirho commented 2 years ago

I've tried it on my old macbook x86 processor and it worked just fine. I believe this is related to architecture that libs are built for. So let me know if anyone knows how to fix this

tried something related to this https://github.com/hmenyus/node-calls-python/issues/17 didn't work.

Thanks