tRPCttRPC
Powered by
🦊�
tRPC•15mo ago•
3 replies
🦊

Prevent client tsc from typechecking the server

Hello,

I'm trying to use trpc as documented here, but as soon as I put
import type { AppRouter } from "../../src/index.ts";
import type { AppRouter } from "../../src/index.ts";
the tsc for the browser client tries to check the node server and throws errors like

Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
Cannot find module '@trpc/server/dist/adapters/standalone.js' or its corresponding type declarations.
Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
Cannot find module '@trpc/server/dist/adapters/standalone.js' or its corresponding type declarations.
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Client `tsc` checking server code
ChenCChen / ❓-help
3y ago
React tsc starts checking server types
MarksmithMMarksmith / ❓-help
3y ago
returning undefined from server gets stripped on the client
ibrahimyaacobIibrahimyaacob / ❓-help
3y ago
Preventing uncaught error propagation from server to client
OoijazOOoijaz / ❓-help
2y ago