TryGhost / node-sqlite3

SQLite3 bindings for Node.js
BSD 3-Clause "New" or "Revised" License
6.23k stars 817 forks source link

Database.each() does not bind correctly when installed with Bun #1802

Open SanderGi opened 2 months ago

SanderGi commented 2 months ago

Issue Summary

Everything binds correctly with Bun except the each() method. Calling the each() method causes the following error:

dyld[75263]: missing symbol called
zsh: abort      bun run index.ts

Steps to Reproduce

  1. bun init a new empty project
  2. bun install sqlite3
  3. Add the following code to index.ts
    
    import sqlite3 from 'sqlite3';

const db = new sqlite3.Database('data.db'); db.each('SELECT * FROM sessions', (err, row) => { console.log(row); });


4. Run it with `bun run index.ts`

### Version

5.1.7

### Node.js Version

Bun 1.1.29

### How did you install the library?

M1 MacBook Pro (MacOS 14.6.1). MacOS Bun binary with `curl -fsSL https://bun.sh/install | bash`
SanderGi commented 2 months ago

More details in this issue: https://github.com/SanderGi/sqlite-auto-migrator/issues/1