You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
drizzle-orm + better-sqlite3 fails to link: undefined _js_pg_client_new from drizzle/better-sqlite3/driver.js #602
A minimal drizzle-orm fixture using the better-sqlite3 driver (no postgres dep at all) fails at link time with Undefined symbols: _js_pg_client_new referenced from node_modules/drizzle-orm/better-sqlite3/driver.js. The pg-driver code path is reachable from the better-sqlite3 entry but its FFI symbol isn't being linked in.
Reproducer
tests/release/packages/drizzle-sqlite/ fixture (added to the release-sweep harness this cycle):
// entry.tsimport{drizzle}from"drizzle-orm/better-sqlite3";import{sqliteTable,integer,text}from"drizzle-orm/sqlite-core";import{eq}from"drizzle-orm";importDatabasefrom"better-sqlite3";constsqlite=newDatabase(":memory:");constdb=drizzle(sqlite);constusers=sqliteTable("users",{id: integer("id").primaryKey(),name: text("name").notNull(),age: integer("age").notNull(),});sqlite.exec(`CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT NOT NULL, age INTEGER NOT NULL)`);db.insert(users).values([{id: 1,name: "alice",age: 30}]).run();constall=db.select().from(users).all();console.log(`count=${all.length}`);
Linking (with stdlib)...
Undefined symbols for architecture arm64:
"_js_pg_client_new", referenced from:
_perry_fn_node_modules_drizzle_orm_better_sqlite3_driver_js__drizzle in node_modules_drizzle_orm_better_sqlite3_driver_js.o
_perry_fn_node_modules_drizzle_orm_better_sqlite3_driver_js__drizzle in node_modules_drizzle_orm_better_sqlite3_driver_js.o
_perry_fn_node_modules_drizzle_orm_better_sqlite3_driver_js__drizzle in node_modules_drizzle_orm_better_sqlite3_driver_js.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1
Error: Linking failed
Why this matters
Pure sqlite-only fixture; no pg import, no postgres backend in scope. Either drizzle's better-sqlite3 entry transitively imports pg code that codegen incorrectly emits FFI calls into, or perry's compilePackages emits FFI calls for symbols that the well-known-binding logic doesn't know to pull in.
Same root cause may affect any drizzle dialect that lives alongside other dialects in the npm package's source tree.
Environment
Perry 0.5.699
drizzle-orm ^0.36.0, better-sqlite3 ^11.0.0
macOS 26.4 / arm64
Discovered via scripts/release_sweep.sh --tier=3 (tests/release/packages/drizzle-sqlite/)
Activity
fix: closes #601 #602 #605 #606 #607 #608 — release-sweep cycle (v0.5…
proggeramlug commentedon May 9, 2026
Fixed in v0.5.707 (commit bb30703). See changelog for details.
fix(compile,runtime): 14 walls from Next.js standalone compile valida…
fix(compile,runtime): 14 walls from Next.js standalone compile valida…
fix(stdlib): six native-package dispatch gaps (ratelimit, cron, backo…