kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
522 stars 44 forks source link

No native build was found for platform=linux arch=x64 runtime=electron #182

Open KaKi87 opened 2 years ago

KaKi87 commented 2 years ago

Hello,

I was told to report the following issue here : parcel-bundler/parcel#7666

Thanks

kriszyp commented 2 years ago

I tried running your repo https://git.kaki87.net/KaKi87/template-electron17-vue3-parcel2 on my linux mint box, which seems to be configured almost identically to the versions you described in the parcel ticket, and parcel/lmdb seemed to run fine without issue. I tried this with parcel@2.2.1 (lmdb@2.2.1) and latest parcel (2.6.1 with lmdb@2.5.2). Do you have any ideas what could be different?

tianalemesle commented 2 years ago

I reported this issue 4 months ago and had time to workaround it, but I'd stil prefer a proper fix, you may reproduce the issue by checking out the issue/lmdb-js_182 branch.

Thanks

kriszyp commented 2 years ago

Ok, thank you, I actually am able to reproduce an error, but it is different error than the original parcel ticket. The error is missing symbols (mangled C++ symbol names) when loading the library (at least using the latest lmdb version). I do know how to fix this error (this is due to electron apparently using a different shared library loading setting than node).

kriszyp commented 2 years ago

I have put in a fix for missing symbols in v2.5.3. Let me know if it helps.

KaKi87 commented 2 years ago

What's the proper way to try this, since I don't directly use this module ? Thanks

kriszyp commented 2 years ago

In your package.json, in NPM 8: "overrrides": { "lmdb": "2.5.3" },

Yarn: "resolutions": { "lmdb": "2.5.3" },

Older NPM, no "proper" way, just have to manually replace the directory in node_modules.

KaKi87 commented 2 years ago

I use yarn btw :joy:

mountainash commented 2 years ago

"overrrides": { "lmdb": "2.5.3" },

Typo... overrrides too many rs, should be overrides

astagi commented 2 years ago

Does overrides fix the problem?

astagi commented 2 years ago

Ok, tried overrides after a failed build on Vercel, it fixes the problem

  "overrides": { 
    "lmdb": "2.6.0" 
  }

@kriszyp I think we can close this issue.