theLMGN
theLMGN
TtRPC
Created by theLMGN on 12/6/2024 in #❓-help
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.
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.
4 replies