/lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found

I am currently stuck running into an issue using the latest version of DuckDB with Vercel.

You can reproduce this by deploying GitHub - AlfieJones/duckdb-vercel-bug to vercel. While building you’ll get the erorr:

Error: Failed to load external module @duckdb/node-api: Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /vercel/path0/node_modules/@duckdb/node-bindings-linux-x64/duckdb.node)

Looks like the latest version of @duckdb/node-api requires this library

HI @alfiejones, welcome to the Vercel Community!

Let me reach out to our team and see what can be a fix for this.

Hi @alfiejones, our team has acknowledged the issue but it requires a more thorough review and work from a wider team so can’t share any timelines yet. Rest assured, I’ll update this thread when I have any news.

Hi @alfiejones, it appears that duckdb is compiling the pre-compiled version on to the new. Ideally duckdb compiles the binary on an older version of glibc to ensure compatibility. You can probably solve this by pinning to an older version if that’s an option. Otherwise you could potentially build the package from source. Not great, but would move them past this.

I think it’a also worth raising this with the DuckDB team as this will affect anyone trying to run on Lambda.

The lastest duckdb "@duckdb/node-api": "1.4.3-r.1" seems to work with vercel node24 and fluid compute enabled.

See a quick test here:

app api route: Flowblade example API

Which executes: flowblade/examples/apps/nextjs-app/src/features/demo/duckdb/server/demo-duckdb.repo.ts at 650350317ab384a5acc07470482f2b984d89126d · belgattitude/flowblade · GitHub

PS: for some obscure reason duckdb was already working but through the page router (not the app router) so I guess vercel uses different images when deploying.

I think this issue can be closed