libsql icon indicating copy to clipboard operation
libsql copied to clipboard

X64 Mac users are getting "Error: Cannot find module '@libsql/darwin-x64'"

Open rathboma opened this issue 1 year ago • 6 comments

Hi folks,

I'm bundling LibSQL inside Beekeeper Studio. It works fine on Mac M1, Linux, Windows, but does NOT seem to work on Intel Macs. Here's my user report

All my other native modules work, but for some reason @libsql/darwin-x64 is not getting bundled.

Seems like someone else had this issue in the past but it was not officially resolved.

Hoping you can direct me to the right way to fix this? I don't really know what else to do tbh.

rathboma avatar Jun 13 '24 17:06 rathboma

Did something change after 0.3.4?

rathboma avatar Jun 13 '24 17:06 rathboma

@rathboma The package does exist and is up-to-date: https://www.npmjs.com/package/@libsql/darwin-x64?activeTab=versions There's nothing specific about the Darwin/x64 build either... 🤔

penberg avatar Jun 13 '24 17:06 penberg

Hey, I did some tests and it might be an electron-builder quirk, not sure. This is the deal:

  • We build Mac packages on a ARM64 M1 machine, we build for both architectures simultaneously.

  • Builds made in this way are not working on x86_64 machines with libsql.

  • SQLite, Oracle, and other libs with native dependencies do package themselves just fine with this set-up. So there's potentially something a little different about how y'all are handling native deps for Mac.

  • If I build directly on a x86_64 mac, the build works fine.

Could it be that darwin-x64 is only installed when running on an intel mac, vs any mac?

rathboma avatar Jun 13 '24 18:06 rathboma

Did you build the previous version differently? That was working fine..

HameArm avatar Jun 14 '24 02:06 HameArm

@HameArm the previous version didn't include LibSQL. This is a new problem exclusively on LibSQL.

@penberg Can you point me to where @libsql/darwin-x64 gets used? Maybe I need to explicitly include it or something?

To be clear -- this is an issue for any electron developer looking to create universal mac builds, or create an x64 build on an M1 chip (which is now the recommended way)

rathboma avatar Jun 14 '24 19:06 rathboma

It's August 12 and still getting this error, had to revert to v0.3.4. Any updates?

dannextlogic avatar Aug 12 '24 11:08 dannextlogic