🦊
tRPC14mo 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"; 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.
Was this page helpful?