Issues testing a worker

Hey there! When I try to run tests in my worker using cloudflare:test with vitests I have issues on localhost (in enviroment test works perfectly) In the tests I try to connect to my database using a standard PG client but the error I'm having is: "Error: no such module (node_modules/pg/lib/pg-cloudflare") pg-cloudflare is not inside of pg, it's is own folder on node_modules, I tried to manually change the path but got the same error. Does anyone had the same issue?
1 Reply
awkweb
awkweb4w ago
Created an issue with a minimal reproduction for this https://github.com/cloudflare/workers-sdk/issues/8840

Did you find this page helpful?