Theo's Typesafe CultTTC
Theo's Typesafe Cult2y ago
12 replies
Matthew

ERROR: o [TRPCClientError]: Invalid response or stream interrupted

Recently kicked off a new project from create-t3-app.

I made one update to use neon db on the db/schema and sent up my first commit/innit. The project deployed and I was able to create a new post and view the latest post with no issues.

For my second commit I wanted to remove most of the boilerplate t3 setup. You can see this in the image I attached for my PR.

I removed
const hello = await api.post.hello({ text: "from tRPC" });


and removed most of the content on the page.

my new page.tsx looks like this

import { LatestPost } from "~/app/_components/post";
import { api, HydrateClient } from "~/trpc/server";

export default async function Home() {
  void api.post.getLatest.prefetch();

  return (
    <HydrateClient>
      <main className="flex min-h-screen flex-col items-center justify-center">
        <div className="container flex flex-col items-center justify-center gap-12 px-4 py-16">
          <LatestPost />
        </div>
      </main>
    </HydrateClient>
  );
}


I now get this error when deploying to vercel.
o [TRPCClientError]: Invalid response or stream interrupted
    at o.from (/vercel/path0/.next/server/chunks/258.js:2:59037)
    at /vercel/path0/.next/server/chunks/258.js:2:65841
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  meta: undefined,
  shape: undefined,
  data: undefined,
  digest: '1056879117',
  [cause]: _ [Error]: Invalid response or stream interrupted
      at Object.a (/vercel/path0/.next/server/chunks/258.js:6:12614)
      at [kAbort] (node:internal/webstreams/writablestream:537:33)
      at ensureIsPromise (node:internal/webstreams/util:185:19)
      at writableStreamFinishErroring (node:internal/webstreams/writablestream:905:5)
      at writableStreamStartErroring (node:internal/webstreams/writablestream:737:5)
      at writableStreamAbort (node:internal/webstreams/writablestream:680:5)
      at node:internal/webstreams/readablestream:1506:15
Screenshot_2024-07-28_at_6.35.50_PM.png
Screenshot_2024-07-28_at_6.33.37_PM.png
Was this page helpful?