-
Notifications
You must be signed in to change notification settings - Fork 210
[0.20.0] Fatal error: Error: Dynamic require of "events" is not supported #288
Copy link
Copy link
Description
It seems latest version is broken, at least on my build. I use node@24.11.1 and on
npx @bytebase/dbhub@latest --transport stdio --dsn postgres://postgres:postgrespassword@localhost:5433/postgres
it throws:
Fatal error: Error: Dynamic require of "events" is not supported
at file:///Users/stathis/.npm/_npx/d622e0cd94113b69/node_modules/@bytebase/dbhub/dist/chunk-WWAWV7DQ.js:15:9
at node_modules/.pnpm/pg@8.16.0/node_modules/pg/lib/client.js (file:///Users/stathis/.npm/_npx/d622e0cd94113b69/node_modules/@bytebase/dbhub/dist/postgres-JB3LPXGR.js:3716:24)
at __require2 (file:///Users/stathis/.npm/_npx/d622e0cd94113b69/node_modules/@bytebase/dbhub/dist/chunk-WWAWV7DQ.js:21:50)
at node_modules/.pnpm/pg@8.16.0/node_modules/pg/lib/index.js (file:///Users/stathis/.npm/_npx/d622e0cd94113b69/node_modules/@bytebase/dbhub/dist/postgres-JB3LPXGR.js:5022:19)
at __require2 (file:///Users/stathis/.npm/_npx/d622e0cd94113b69/node_modules/@bytebase/dbhub/dist/chunk-WWAWV7DQ.js:21:50)
at file:///Users/stathis/.npm/_npx/d622e0cd94113b69/node_modules/@bytebase/dbhub/dist/postgres-JB3LPXGR.js:5080:26
at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:671:26)
at async file:///Users/stathis/.npm/_npx/d622e0cd94113b69/node_modules/@bytebase/dbhub/dist/index.js:1509:9
at async Promise.all (index 0)
Downgrading to 0.19.1 works as a charm:
npx @bytebase/dbhub@0.19.1 --transport stdio --dsn postgres://postgres:postgrespassword@localhost:5433/postgres
Reactions are currently unavailable