Lick A Brick
Explore posts from serversDTDrizzle Team
•Created by Lick A Brick on 3/26/2025 in #help
'process is not defined' in Sveltekit SPA
Hi, I have a monorepo (turborepo) and I have my drizzle instance as a package. In my schema I have
createInsertSchema
I want to use in my frontend to do form validation. The problem is I get the error process is not defined
because the code is ran from the client. In FF devtools I see it goes wrong at user: process.platform === 'win32' ? process.env.USERNAME : process.env.USER,
(line 8 @ http://localhost:5173/node_modules/pg/lib/defaults.js). Why does it need pg
in the first place? I only import the createInsertSchema.
Here is the code:
/// Database package:
packages\database\index.ts
packages\database\database.ts
packages\database\schema.ts
//// My Sveltekit app
The code lives in a component e.g. myForm.svelte
Simply importing the create schema makes it pop the error. Any help is appreciated.2 replies
DTDrizzle Team
•Created by Lick A Brick on 3/25/2025 in #help
Can't get Drizzle working in turborepo as package
I can't get Drizzle working as package in turborepo, getting all kind of TS errors. Does anyone have a working example?
I am using Sveltekit as the frontend, hono as the backend (with nodeJS) and want to use a message queue worker (BullMQ in my case) too as a seperate app. Both Hono and the message queue will need to access drizzle, thats why I want to use Drizzle as a package.
1 replies
BABetter Auth
•Created by Lick A Brick on 3/13/2025 in #help
Organizations plugin with Drizzle RLS
Hi, I am creating a hobby project which is a multi tenant app (using the organisations plugin).
I use Hono to serve a CRUD API. How can I:
- Restrict certain columns to users with certain roles (keeping in mind a user can belong to multiple organisations with different roles between organisations)
- Make sure users can only retrieve records which belong to their organisation(s)
- Restrict creating / updating records in certain tables to certain roles?
Am I correct it would be better to add these restrictions on the DB level or is it better to manage this at the API (Hono in my case) level?
1 replies
PD🧩 Plasmo Developers
•Created by Lick A Brick on 8/7/2024 in #🔰newbie
Overwrite existing CSS/Styling on page
Hi, how can I overwrite existing CSS on a webpage?
3 replies