TryGhost / node-sqlite3

SQLite3 bindings for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running Sequelize on Bun using sqlite3 produces undefined symbol: uv_close error

jerrywoo96 opened this issue · comments

Issue Summary

Node.js has no errors, but since being introduced to me that Bun has up to 2x better improvement in performance when running Express.js apps, i've decided to give Bun a try.

Running Sequelize using the sqlite3 driver produces this error:

TypeError: /nodejs/app/node_modules/sqlite3/build/Release/node_sqlite3.node: undefined symbol: uv_close
      at bindings (/nodejs/app/node_modules/bindings/bindings.js:112:48)
      at /nodejs/app/node_modules/sqlite3/lib/sqlite3-binding.js:1:8
      at /nodejs/app/node_modules/sqlite3/lib/sqlite3.js:2:7
      at _loadDialectModule (/nodejs/app/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:49:14)
      at new ConnectionManager (/nodejs/app/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:18:16)
      at new SqliteDialect (/nodejs/app/node_modules/sequelize/lib/dialects/sqlite/index.js:13:30)
      at new Sequelize (/nodejs/app/node_modules/sequelize/lib/sequelize.js:194:20)
      at /nodejs/app/utils/db.js:8:26

Line 8 in my db.js contains the following:

import { DataTypes, Op, Sequelize, col, fn, where } from 'sequelize';

export const SessionDb = new Sequelize({
  logging: false,
  dialect: 'sqlite',
  storage: dbList.Session
});

Steps to Reproduce

export const SessionDb = new Sequelize({
logging: false,
dialect: 'sqlite',
storage: dbList.Session
});

Version

5.1.7

Node.js Version

Bun v1.0.30 (Not Node.js) on Alpine docker image container

How did you install the library?

npm -i sqlite3

This is a bug in Bun