Skip to content

Binaries for better_sqlite.node and crsqlite.dylib on arm64 architecture #25

@Sheraff

Description

@Sheraff

Trying to start the project in a very naive manner, just pnpm i and pnpm dev did not start sqlite. I got the following error

Error: dlopen(/Users/Flo/GitHub/vulcan-test/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node, 0x0001): 
  tried: 
    '[repo]/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node' 
      (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), 
    '/System/Volumes/Preboot/Cryptexes/OS/[repo]/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node' 
      (no such file), 
    '[repo]/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite3.node' 
      (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

I managed to bypass this issue by manually downloading the arm64 binary from https://github.com/WiseLibs/better-sqlite3/releases and replacing it inside [repo]/node_modules/.pnpm/[email protected]/node_modules/better-sqlite3/build/Release/better_sqlite.node.

I then had a very similar issue for crsqlite.dylib so I downloaded crsqlite-darwin-aarch64.dylib and replaced it inside [repo]/node_modules/.pnpm/@[email protected]/node_modules/@vlcn.io/crsqlite/dist/crsqlite.dylib


I'm not used to working with node modules that download binaries (or maybe I am and I just never noticed). Is there a way to make it so that the correct architecture is automatically downloaded?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions