Caspian Nightworth
Caspian Nightworth
Explore posts from servers
DTDrizzle Team
Created by Caspian Nightworth on 6/11/2024 in #help
Convert PostgreSQL to Drizzle ORM
That helped. Thank you
4 replies
DTDrizzle Team
Created by Caspian Nightworth on 6/10/2024 in #help
conflicting peer dependency when installing drizzle-orm
Yeah, I switched from npm to pnpm and I didn't run into the issue
4 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/9/2024 in #questions
unsafe assignment of an `any` value
wow, now it works, lol. love it when you threaten things it starts to work, lol
10 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/9/2024 in #questions
unsafe assignment of an `any` value
yeah, i can. need to commit the changes
10 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/9/2024 in #questions
unsafe assignment of an `any` value
i used this code right here that you suggested:
import { z } from "zod";

const packageJsonSchema = z.object({ version: z.string() });

const packageJson = packageJsonSchema.parse(
JSON.parse(
await readFile(new URL("./package.json", import.meta.url), "utf-8"),
),
);
import { z } from "zod";

const packageJsonSchema = z.object({ version: z.string() });

const packageJson = packageJsonSchema.parse(
JSON.parse(
await readFile(new URL("./package.json", import.meta.url), "utf-8"),
),
);
10 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
leave it to me to make things overly complex
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
No description
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
ok, i think things are starting to click
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
is the root page.tsx empty or what?
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
because that is where i am calling the header and all that jazz
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
what would be inside the page.tsx?
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
so, for my case, i need to move the header and sidebar to the main layout to be shared across all views
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
then my layout.tsx needs to be redone
import { Header } from "./(header)/_components/header/header";
import { MobileHeader } from "./(header)/_components/mobileHeader/mobileHeader";
import { NavAndContent } from "./(main)/_components/navAndContent/navAndContent";

export default async function Home() {
return (
<div className="flex h-full w-full flex-col">
<Header />
<MobileHeader />
<div className="h-px w-screen bg-border"></div>
<NavAndContent />
</div>
);
}
import { Header } from "./(header)/_components/header/header";
import { MobileHeader } from "./(header)/_components/mobileHeader/mobileHeader";
import { NavAndContent } from "./(main)/_components/navAndContent/navAndContent";

export default async function Home() {
return (
<div className="flex h-full w-full flex-col">
<Header />
<MobileHeader />
<div className="h-px w-screen bg-border"></div>
<NavAndContent />
</div>
);
}
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
my organization skills suck trying to keep things organized for this app
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
i thought () meant grouping and has no impact on routing
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
even if i move say, the spells folder outside directly under the app folder, the way it is rendered is the same
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
i'm not following at all.
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/10/2024 in #questions
Routing Assistance
hmm?
32 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/9/2024 in #questions
unsafe assignment of an `any` value
i made the changes to use zod and it wasn't liked too well
❯ npm run dev

> next dev

file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/node_modules/zod/lib/index.mjs:587
const error = new ZodError(ctx.common.issues);
^

ZodError: [
{
"code": "invalid_type",
"expected": "object",
"received": "string",
"path": [],
"message": "Expected object, received string"
}
]
at get error (file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/node_modules/zod/lib/index.mjs:587:31)
at ZodObject.parse (file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/node_modules/zod/lib/index.mjs:692:22)
at file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/next.config.mjs:6:39 {
issues: [
{
code: 'invalid_type',
expected: 'object',
received: 'string',
path: [],
message: 'Expected object, received string'
}
],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
code: 'invalid_type',
expected: 'object',
received: 'string',
path: [],
message: 'Expected object, received string'
}
]
}

Node.js v22.2.0
❯ npm run dev

> next dev

file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/node_modules/zod/lib/index.mjs:587
const error = new ZodError(ctx.common.issues);
^

ZodError: [
{
"code": "invalid_type",
"expected": "object",
"received": "string",
"path": [],
"message": "Expected object, received string"
}
]
at get error (file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/node_modules/zod/lib/index.mjs:587:31)
at ZodObject.parse (file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/node_modules/zod/lib/index.mjs:692:22)
at file:///home/demonicpagan/development/nextjs/ffxiv-blue-mage-tracker/next.config.mjs:6:39 {
issues: [
{
code: 'invalid_type',
expected: 'object',
received: 'string',
path: [],
message: 'Expected object, received string'
}
],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
code: 'invalid_type',
expected: 'object',
received: 'string',
path: [],
message: 'Expected object, received string'
}
]
}

Node.js v22.2.0
10 replies
TTCTheo's Typesafe Cult
Created by Caspian Nightworth on 6/1/2024 in #questions
From 0 to Production - The Modern React Tutorial (RSCs, Next.js, Shadui, Drizzle, TS and more) Issue
resolved by deleting the project in Vercel and reimporting it.
3 replies