thomasmacfarlaine
TTCTheo's Typesafe Cult
•Created by thomasmacfarlaine on 10/15/2023 in #questions
./node_modules/cacheable-lookup/source/index.js:10:2Module not found: Can't resolve 'dns'
How to solve or what is causing it?
3 replies
TTCTheo's Typesafe Cult
•Created by thomasmacfarlaine on 4/18/2023 in #questions
Sanity integration.
I want to add sanityV3 to my T3 app to allow internal members to quickly write blogs.
I followed this repo - https://github.com/sanity-io/nextjs-blog-cms-sanity-v3
I am using nextjs /pages setup with sanity v3. I can't figure out how to solve these errors.
export const settingsQuery = groq
*[_type == "settings"][0]
;
typescript error:
Unsafe assignment of an any
value.eslint@typescript-eslint/no-unsafe-assignment
const settingsQuery: string2 replies
TTCTheo's Typesafe Cult
•Created by thomasmacfarlaine on 3/17/2023 in #questions
How does one use prisma enums with zod when creating a new "post".
For eg.
A post has tags -> Tag[]
enum Tag { "BUSINESS" | "DESIGN"}
What is the best way to use the prisma enum with zod.
Currently I get this error.
import { Tag } from "@prisma/client";
const [tags, setTags] = useState<Tag[]>([]);
{Object.values(Tag).map((tag) => {
return (...)
)}}
Type 'Tag[]' is not assignable to type '"BUSINESS" | "DESIGN"'.ts(2322)
9 replies