mike
mike
Explore posts from servers
CDCloudflare Developers
Created by mike on 9/8/2024 in #workers-help
pg example not working
I followed the example from the Cloudflare documentation for connecting to Postgres using node-postgres / pq at the link: https://developers.cloudflare.com/hyperdrive/configuration/connect-to-postgres/#node-postgres–pg. However, I encountered the error “this.stream.once is not a function.” According to this compatibility matrix (https://workers-nodejs-compat-matrix.pages.dev/), nodejs_compat_v2 should support the .once method on streams. Is there a related issue or a step I might have overlooked? My code is based on the documentation, and you can view it here: https://github.com/waigel/example-pg-cloudflare. Any suggestions or help would be appreciated!
2 replies