Axat
Axat
Explore posts from servers
DTDrizzle Team
Created by Axat on 2/29/2024 in #help
Drizzle Studio giving error due to `CURRENT_TIMESTAMP` in schema
No description
1 replies
TtRPC
Created by Axat on 2/1/2024 in #❓-help
Using tRPC with Expo API Routes feature?
Is there a possibility to merge "tRPC Express Adapter" with "Expo API Route Express Deployment"? tRPC Express Adapter: https://trpc.io/docs/server/adapters/express Expo API Route Express Deployment: https://docs.expo.dev/router/reference/api-routes/#express A little bit of help would be great, so that I can implement a minimal example. I need to use them together in my new project.
1 replies
DTDrizzle Team
Created by Axat on 1/29/2024 in #help
Getting error while using Drizzle with MySQL2
I am following this guide: https://orm.drizzle.team/docs/get-started-mysql#mysql-2 My setup: - Fork of create-t3-turbo : https://github.com/t3-oss/create-t3-turbo - Trying to replace planetscale with "local docker mysql" Using below code for drizze:
const config: ConnectionOptions = {
host: process.env.DB_HOST!,
user: process.env.DB_USERNAME!,
password: process.env.DB_PASSWORD!,
};
const connection = await mysql.createConnection(config);

export const db = drizzle(connection, { schema: schema, mode: "default" });
const config: ConnectionOptions = {
host: process.env.DB_HOST!,
user: process.env.DB_USERNAME!,
password: process.env.DB_PASSWORD!,
};
const connection = await mysql.createConnection(config);

export const db = drizzle(connection, { schema: schema, mode: "default" });
Getting below error:
⨯ ../../node_modules/.pnpm/[email protected]/node_modules/mysql2/lib/auth_plugins/caching_sha2_password.js:6:15
Module not found: Can't resolve 'crypto'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/mysql2/lib/auth_plugins/index.js
../../node_modules/.pnpm/[email protected]/node_modules/mysql2/index.js
../../node_modules/.pnpm/[email protected]/node_modules/mysql2/promise.js
../../packages/db/src/index.ts
../../packages/auth/src/index.ts
./src/app/api/trpc/[trpc]/route.ts
⨯ ../../node_modules/.pnpm/[email protected]/node_modules/mysql2/lib/auth_plugins/caching_sha2_password.js:6:15
Module not found: Can't resolve 'crypto'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
../../node_modules/.pnpm/[email protected]/node_modules/mysql2/lib/auth_plugins/index.js
../../node_modules/.pnpm/[email protected]/node_modules/mysql2/index.js
../../node_modules/.pnpm/[email protected]/node_modules/mysql2/promise.js
../../packages/db/src/index.ts
../../packages/auth/src/index.ts
./src/app/api/trpc/[trpc]/route.ts
13 replies