Connecting to CockroachDB serverless using pg via workers
- Created a npx wrangler init .
- Then "npm install pg" and added the query code into index.js
- then, npx wrangler dev, got compatibility errors, and got suggestions to add "node_compat = true", and I did, those errors disappeared
- Then again ran "npx wrangler dev", got error ' could not resolve "pg-native" '. And this is where I'm struck. I ran same code in normal js and it worked, but I don't know why is it asking "pg-native", and also I tried to install it locally and globally, and it won't get installed.
- What to do?
