Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jerrywoo96 opened this issue Mar 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jerrywoo96
Copy link

What version of Bun is running?

v1.0.30

What platform is your computer?

Linux 4.4.302+ x86_64 unknown

What steps can reproduce the bug?

// npm -i sequelize

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

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

What is the expected behavior?

Code continues running with no errors.

What do you see instead?

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

Additional information

uv_close belongs to the libuv library.

I'm using the oven/bun:alpine docker image.

Running the code above in Node.js works as expected, but running on bun produces the error above instead.

I decided to try out bun to replace node.js for my express app as bun has more performance than node.js.

here is the issue tracker on sqlite3's repo:
TryGhost/node-sqlite3#1769

@jerrywoo96 jerrywoo96 added the bug Something isn't working label Mar 14, 2024
@Electroid
Copy link
Contributor

Duplicate of #4290

@Electroid Electroid marked this as a duplicate of #4290 Mar 14, 2024
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants