Unable to run drizzle query for supabase
I've tried npm, pnpm and bun to check if was something related to how modules are resolved.
Here is my
Getting this stack trace:
Below is my package json dependencies.
I searched online and found it was happenning for pg 8.11 and tried to manually set it to 8.10 like below and running
Any help is much appreciated.
Here is my
drizzle.tsdrizzle.ts:import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'
const connectionString = process.env.DATABASE_URL!
export const client = postgres(connectionString, { prepare: false })
export const db = drizzle(client)import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'
const connectionString = process.env.DATABASE_URL!
export const client = postgres(connectionString, { prepare: false })
export const db = drizzle(client)Getting this stack trace:
Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "cloudflare:" URIs.
Import trace for requested module:
cloudflare:sockets
./node_modules/.pnpm/postgres@3.4.4/node_modules/postgres/cf/polyfills.js
./node_modules/.pnpm/postgres@3.4.4/node_modules/postgres/cf/src/index.js
./db/drizzle.tsModule build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "cloudflare:" URIs.
Import trace for requested module:
cloudflare:sockets
./node_modules/.pnpm/postgres@3.4.4/node_modules/postgres/cf/polyfills.js
./node_modules/.pnpm/postgres@3.4.4/node_modules/postgres/cf/src/index.js
./db/drizzle.tsBelow is my package json dependencies.
"dependencies": {
"@hono/zod-validator": "^0.2.1",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-slot": "^1.0.2",
"@tanstack/react-query": "^5.40.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.30.10",
"hono": "^4.4.0",
"lucide-react": "^0.378.0",
"next": "14.2.3",
"next-themes": "^0.3.0",
"pg": "^8.11.5",
"postgres": "^3.4.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-use": "^17.5.0",
"sonner": "^1.4.41",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8"
}"dependencies": {
"@hono/zod-validator": "^0.2.1",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-slot": "^1.0.2",
"@tanstack/react-query": "^5.40.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.30.10",
"hono": "^4.4.0",
"lucide-react": "^0.378.0",
"next": "14.2.3",
"next-themes": "^0.3.0",
"pg": "^8.11.5",
"postgres": "^3.4.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-use": "^17.5.0",
"sonner": "^1.4.41",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8"
}I searched online and found it was happenning for pg 8.11 and tried to manually set it to 8.10 like below and running
pnpm uppnpm up but to no avail:"pg": "8.10.0","pg": "8.10.0",Any help is much appreciated.



