Weldawadyathink
Weldawadyathink
Explore posts from servers
TtRPC
Created by Weldawadyathink on 10/4/2024 in #❓-help
Error with AppRouter type mismatch in Deno
Hi everyone! I am trying to fix some type issues with a tRPC project. I am using Deno 2.0. The server and client are separate projects (but in a monorepo). The server is using the hono middleware to host the /trpc endpoint. The client is a vite react static site. I am using the react query integration. Here is the weird part: Everything is actually fully functional. The vite frontend can tRPC query the backend perfectly fine. However the frontend is complaining about type mismatches. Not having working types kinda defeats the purpose of tRPC. client/src/utils/api.ts
import { createTRPCReact } from "@trpc/react-query";
import type { AppRouter } from "../../../server/routers/_app.ts";

export const api = createTRPCReact<AppRouter>();
import { createTRPCReact } from "@trpc/react-query";
import type { AppRouter } from "../../../server/routers/_app.ts";

export const api = createTRPCReact<AppRouter>();
This is where I get the first type issue. I think solving this will solve all the issues. I get the error on the <AppRouter> type. This post went over the length limit, so more details in the next post.
8 replies
CDCloudflare Developers
Created by Weldawadyathink on 4/12/2024 in #pages-help
Wrangler deployment fails if functions folder exists
Hi all, I am having some trouble deploying a pages app with a functions directory. If I rename the functions folder so it isn’t included, the static site will deploy just fine. If I include anything in the functions directory it fails. The wrangler cli shows now errors and says it was successful, but the dashboard says the deployment failed with no error messages.
14 replies