postgres orm drizzle setup can not be bundled by rollup

I've used the cloudflare pages template for qwik ( https://developers.cloudflare.com/pages/framework-guides/deploy-a-qwik-site/ ). Then following the guide for integrating hyperdrive I added
postgres.js
and
drizzle
. When trying to run the
build
script I get the following error
[commonjs--resolver] Cannot bundle Node.js built-in "os" imported from "node_modules/.pnpm/postgres@3.3.5/node_modules/postgres/src/index.js". Consider disabling ssr.noExternal or remove the built-in dependency.

This library is recommended by the cloudflare docs ( https://developers.cloudflare.com/hyperdrive/learning/connect-to-postgres/ ) so I'm confused why it is giving errors.

Anyone know how to fix this?
Was this page helpful?