Liam
Liam
Explore posts from servers
DTDrizzle Team
Created by nightwatch128 on 11/10/2024 in #help
TypeError: client.migrate
Getting this aswell, did you find a solution?
3 replies
DTDrizzle Team
Created by Liam on 7/31/2024 in #help
There is not enough information to infer relation
5 replies
DTDrizzle Team
Created by Liam on 7/31/2024 in #help
There is not enough information to infer relation
The weird thing is that as far as I can tell this is a one-to-one relation, so much of the advice on other tables does not apply here
5 replies
DTDrizzle Team
Created by Liam on 7/8/2023 in #help
Drizzle-zod Include Relations
I did it like so if anyone needs it for future reference (cc @pudgereyem @shreddish )
const userValidator = createInsertSchema(users);

const userDataValidator = z.object({
data: createInsertSchema(data),
});

export const insertUserWithDataValidator = userValidator.merge(userDataValidator);
const userValidator = createInsertSchema(users);

const userDataValidator = z.object({
data: createInsertSchema(data),
});

export const insertUserWithDataValidator = userValidator.merge(userDataValidator);
You can also do it via extent, albeit with some wonky behaviours sometimes if you start adding in omits and what not
const userWithDataValidator = createInsertSchema(users).extend({
data: createInsertSchema(data)
});
const userWithDataValidator = createInsertSchema(users).extend({
data: createInsertSchema(data)
});
10 replies
RRailway
Created by Liam on 5/8/2024 in #✋|help
Nixpacks Ignoring Engines.Node
0d20c18a-47d6-45ee-be99-56666d3838e3
5 replies
DTDrizzle Team
Created by bun on 4/1/2024 in #help
dates in sqlite not being evaluated, causing "Invalid Date"
Hey OP, did you ever find a solution to this?
4 replies
DTDrizzle Team
Created by makaron pelnoziarnisty on 2/8/2024 in #help
Cannot read properties of undefined (reading 'columns')
beyond using the local server
5 replies
DTDrizzle Team
Created by makaron pelnoziarnisty on 2/8/2024 in #help
Cannot read properties of undefined (reading 'columns')
Hey did you ever wind up finding a fix for this?
5 replies
RRailway
Created by Liam on 2/19/2024 in #✋|help
Install Newer Version of Node JS in Dockerfile
My project exists in a mono repo and has no package-lock defined in the specific app. Going to fix this at some point since I fully understand its bad practice, but npm ci requires that the packge-lock exists. Just need to do some fiddeling with my monorepo to get it to work properly.
11 replies
RRailway
Created by Liam on 2/19/2024 in #✋|help
Install Newer Version of Node JS in Dockerfile
That worked! I had to change npm ci to npm i but seems to be working now. Thanks!
11 replies
RRailway
Created by Liam on 2/19/2024 in #✋|help
Install Newer Version of Node JS in Dockerfile
Oops sorry forgot the project ID, looking to install v20.11.1 (LTS)
11 replies
RRailway
Created by Liam on 2/19/2024 in #✋|help
Install Newer Version of Node JS in Dockerfile
6cf9a94a-c057-4df7-8047-200d7bf6226b
11 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
Thank you!
63 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
Setting the bun version worked!
63 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
No description
63 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
sorry my bad had not copied the most recent version of the nixpacks toml
[phases.setup]
nixPkgs = ['...', 'bun']

[phases.build]
cmds = ['pnpm install --filter db', 'pnpm install --filter config', 'pnpm install --filter bot']

[start]
cmd = 'bun -v && pwd && pnpm --filter=bot run start'
[phases.setup]
nixPkgs = ['...', 'bun']

[phases.build]
cmds = ['pnpm install --filter db', 'pnpm install --filter config', 'pnpm install --filter bot']

[start]
cmd = 'bun -v && pwd && pnpm --filter=bot run start'
63 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
No description
63 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
No description
63 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
running pnpm run start --filter bot from the root of the monorepo on my local machine leads to the bot starting correctly
63 replies
RRailway
Created by Liam on 2/13/2024 in #✋|help
Running a Bun + pnpm Application on Railway
I do it via this nixpacks toml:
[phases.setup]
nixPkgs = ['...', 'bun']

[phases.build]
cmds = ['pnpm install --filter db', 'pnpm install --filter config', 'pnpm install --filter bot']

[start]
cmd = 'pnpm run start --filter bot'
[phases.setup]
nixPkgs = ['...', 'bun']

[phases.build]
cmds = ['pnpm install --filter db', 'pnpm install --filter config', 'pnpm install --filter bot']

[start]
cmd = 'pnpm run start --filter bot'
with the bot app package.json having the following scripts:
"scripts": {
"dev": "bun run --env-file=../../.env --hot bot.ts",
"start": "bun run --env-file=../../.env ./bot.ts",
"deploy:dev": "bun run --env-file=../../.env --dev deploy-commands.ts",
"deploy:prod": "bun run --env-file=../../.env --prod deploy-commands.ts"
}
"scripts": {
"dev": "bun run --env-file=../../.env --hot bot.ts",
"start": "bun run --env-file=../../.env ./bot.ts",
"deploy:dev": "bun run --env-file=../../.env --dev deploy-commands.ts",
"deploy:prod": "bun run --env-file=../../.env --prod deploy-commands.ts"
}
63 replies