Open Feuerhamster opened 1 year ago
You can mark the path "pg-cloudflare" as external to exclude it from the bundle, which will remove this error.
This fixed the problem during build but at runtime with client side components it still appears
Your client-side components shouldn’t be loading pg; even if you can get it to quietly import without errors, that’s a lot of unnecessary code served to clients.
We're using the
pg
package in a project. Recently, we get this error during build process:The thing is, we are not using cloudflare or cloudflare workers at all. I saw that the
pg-cloudflare
package is in the optional dependencies of thepg
package. For whatever reason, node installs all optional dependencies by default. So I tried installing the packages without the optional dependencies.But now there is this error:
What did I do wrong?