discord-questions.trpc.io/m/1394374549122060318

Preview meta tags from the discord-questions.trpc.io website.

Linked Hostnames

6

Thumbnail

Search Engine Appearance

Google

https://discord-questions.trpc.io/m/1394374549122060318

Type errors when deploying to Vercel using new client integration - tRPC

Hey, wondering if anyone else had a similar issue and found a fix for it. I have a Turborepo monorepo with a Next.js app and a trpc package. When trying to deploy to Vercel, I'm getting type errors like `Property 'map' does not exist on type '() => never'`. The relevant code snippet would be this: ```tsx export const Component = () => { const trpc = useTRPC() const { data, isLoading } = useQuery(trpc.my.endpoint.queryOptions()) return ( <div> {!isLoading && data && data.length && ( <div> {data.map((c, i) => ( /* ... */ ))} </div> )} </div> ) } ``` The error doesn't make any sense to me. My guess is that the types of my router are not available in the Vercel environment and thus the type of `data` is wrong. Locally the build works without problems. Anyone perhaps knows a fix for this? Thanks :)



Bing

Type errors when deploying to Vercel using new client integration - tRPC

https://discord-questions.trpc.io/m/1394374549122060318

Hey, wondering if anyone else had a similar issue and found a fix for it. I have a Turborepo monorepo with a Next.js app and a trpc package. When trying to deploy to Vercel, I'm getting type errors like `Property 'map' does not exist on type '() => never'`. The relevant code snippet would be this: ```tsx export const Component = () => { const trpc = useTRPC() const { data, isLoading } = useQuery(trpc.my.endpoint.queryOptions()) return ( <div> {!isLoading && data && data.length && ( <div> {data.map((c, i) => ( /* ... */ ))} </div> )} </div> ) } ``` The error doesn't make any sense to me. My guess is that the types of my router are not available in the Vercel environment and thus the type of `data` is wrong. Locally the build works without problems. Anyone perhaps knows a fix for this? Thanks :)



DuckDuckGo

https://discord-questions.trpc.io/m/1394374549122060318

Type errors when deploying to Vercel using new client integration - tRPC

Hey, wondering if anyone else had a similar issue and found a fix for it. I have a Turborepo monorepo with a Next.js app and a trpc package. When trying to deploy to Vercel, I'm getting type errors like `Property 'map' does not exist on type '() => never'`. The relevant code snippet would be this: ```tsx export const Component = () => { const trpc = useTRPC() const { data, isLoading } = useQuery(trpc.my.endpoint.queryOptions()) return ( <div> {!isLoading && data && data.length && ( <div> {data.map((c, i) => ( /* ... */ ))} </div> )} </div> ) } ``` The error doesn't make any sense to me. My guess is that the types of my router are not available in the Vercel environment and thus the type of `data` is wrong. Locally the build works without problems. Anyone perhaps knows a fix for this? Thanks :)

  • General Meta Tags

    6
    • title
      Type errors when deploying to Vercel using new client integration - tRPC
    • charset
      utf-8
    • viewport
      width=device-width, initial-scale=1
    • next-size-adjust
    • description
      Hey, wondering if anyone else had a similar issue and found a fix for it. I have a Turborepo monorepo with a Next.js app and a trpc package. When trying to deploy to Vercel, I'm getting type errors like `Property 'map' does not exist on type '() => never'`. The relevant code snippet would be this: ```tsx export const Component = () => { const trpc = useTRPC() const { data, isLoading } = useQuery(trpc.my.endpoint.queryOptions()) return ( <div> {!isLoading && data && data.length && ( <div> {data.map((c, i) => ( /* ... */ ))} </div> )} </div> ) } ``` The error doesn't make any sense to me. My guess is that the types of my router are not available in the Vercel environment and thus the type of `data` is wrong. Locally the build works without problems. Anyone perhaps knows a fix for this? Thanks :)
  • Open Graph Meta Tags

    3
    • og:title
      Type errors when deploying to Vercel using new client integration - tRPC
    • og:description
      Hey, wondering if anyone else had a similar issue and found a fix for it. I have a Turborepo monorepo with a Next.js app and a trpc package. When trying to deploy to Vercel, I'm getting type errors like `Property 'map' does not exist on type '() => never'`. The relevant code snippet would be this: ```tsx export const Component = () => { const trpc = useTRPC() const { data, isLoading } = useQuery(trpc.my.endpoint.queryOptions()) return ( <div> {!isLoading && data && data.length && ( <div> {data.map((c, i) => ( /* ... */ ))} </div> )} </div> ) } ``` The error doesn't make any sense to me. My guess is that the types of my router are not available in the Vercel environment and thus the type of `data` is wrong. Locally the build works without problems. Anyone perhaps knows a fix for this? Thanks :)
    • og:image
      https://discord-questions.trpc.io/og/post?id=1394374549122060318
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:title
      Type errors when deploying to Vercel using new client integration - tRPC
    • twitter:description
      Hey, wondering if anyone else had a similar issue and found a fix for it. I have a Turborepo monorepo with a Next.js app and a trpc package. When trying to deploy to Vercel, I'm getting type errors like `Property 'map' does not exist on type '() => never'`. The relevant code snippet would be this: ```tsx export const Component = () => { const trpc = useTRPC() const { data, isLoading } = useQuery(trpc.my.endpoint.queryOptions()) return ( <div> {!isLoading && data && data.length && ( <div> {data.map((c, i) => ( /* ... */ ))} </div> )} </div> ) } ``` The error doesn't make any sense to me. My guess is that the types of my router are not available in the Vercel environment and thus the type of `data` is wrong. Locally the build works without problems. Anyone perhaps knows a fix for this? Thanks :)
    • twitter:image
      https://discord-questions.trpc.io/og/post?id=1394374549122060318
  • Link Tags

    8
    • canonical
      https://discord-questions.trpc.io/m/1394374549122060318
    • icon
      https://cdn.answeroverflow.com/867764511159091230/6af104c7f0f39a12fcd55bd7bd28928f/icon.png
    • preload
      https://www.answeroverflow.com/_next/static/media/4f05ba3a6752a328-s.p.woff2
    • preload
      https://www.answeroverflow.com/_next/static/media/9cf9c6e84ed13b5e-s.p.woff2
    • preload
      /discord/2.png

Links

8