Magical.Puffin
Magical.Puffin
Explore posts from servers
CDCloudflare Developers
Created by Magical.Puffin on 4/5/2024 in #pages-help
SvelteKit service bindings in local development
I am trying use a service binding in a serverside function SvelteKit, however it can't be reached during local development, even when running both with wrangler dev. After deployment, it works. [wrangler] Couldn't find 'wrangler dev' session for service "backend-worker" to proxy to https://github.com/magicalpuffin/public-debug/tree/main/2024/cloudflare-pages-service-binding
2 replies
DTDrizzle Team
Created by Magical.Puffin on 4/2/2024 in #help
DrizzleKit Studio TypeError: customResultMapper is not a function
I am trying to get DrizzleKit studio to run with Cloudflare D1. I already saw the existing workaround for the wrangler path issue but I get error message TypeError: customResultMapper is not a function whenever I try to run studio. I have drizzle kit and orm installed:
"drizzle-kit": "^0.20.14",
"drizzle-orm": "^0.30.6",
"drizzle-kit": "^0.20.14",
"drizzle-orm": "^0.30.6",
import type { Config } from 'drizzle-kit';

// Join wrangler path with this file path
import path from 'path';
const wranglerConfigPath = path.resolve(__dirname, 'wrangler.toml');

export default {
schema: './src/lib/db/schema.ts',
out: './drizzle',
driver: 'd1',
dbCredentials: {
wranglerConfigPath: wranglerConfigPath,
dbName: 'prod-d1-tutorial'
}
} satisfies Config;
import type { Config } from 'drizzle-kit';

// Join wrangler path with this file path
import path from 'path';
const wranglerConfigPath = path.resolve(__dirname, 'wrangler.toml');

export default {
schema: './src/lib/db/schema.ts',
out: './drizzle',
driver: 'd1',
dbCredentials: {
wranglerConfigPath: wranglerConfigPath,
dbName: 'prod-d1-tutorial'
}
} satisfies Config;
1 replies