\r\n ~~~~\r\n\r\n../../.yarn/cache/@trpc-server-npm-9.8.1-katt-issue-1020-pin-2021-09-27-12-36-16.6-cdb5a7a4be-e62c21a45b.zip/node_modules/@trpc/server/dist/declarations/src/adapters/node-http/types.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.\r\n\r\n1 /// \u003Creference types=\"node\" />\r\n ~~~~\r\n\r\n../../.yarn/cache/@trpc-server-npm-9.8.1-katt-issue-1020-pin-2021-09-27-12-36-16.6-cdb5a7a4be-e62c21a45b.zip/node_modules/@trpc/server/dist/declarations/src/adapters/node-http/types.d.ts:3:16 - error TS2307: Cannot find module 'qs' or its corresponding type declarations.\r\n\r\n3 import qs from 'qs';\r\n ~~~~\r\n\r\n../../.yarn/cache/@trpc-server-npm-9.8.1-katt-issue-1020-pin-2021-09-27-12-36-16.6-cdb5a7a4be-e62c21a45b.zip/node_modules/@trpc/server/dist/declarations/src/adapters/standalone.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.\r\n\r\n1 /// \u003Creference types=\"node\" />\r\n ~~~~\r\n\r\n../../.yarn/cache/@trpc-server-npm-9.8.1-katt-issue-1020-pin-2021-09-27-12-36-16.6-cdb5a7a4be-e62c21a45b.zip/node_modules/@trpc/server/dist/declarations/src/adapters/standalone.d.ts:5:107 - error TS2344: Type 'IncomingMessage' does not satisfy the constraint 'NodeHTTPRequest'.\r\n Type 'IncomingMessage' is not assignable to type '{ method?: string; query?: any; body?: unknown; }'.\r\n Types of property 'method' are incompatible.\r\n Type 'string | undefined' is not assignable to type 'string'.\r\n Type 'undefined' is not assignable to type 'string'.\r\n\r\n5 export declare type CreateHTTPHandlerOptions\u003CTRouter extends AnyRouter> = NodeHTTPHandlerOptions\u003CTRouter, http.IncomingMessage, http.ServerResponse>;\r\n ~~~~~~~~~~~~~~~~~~~~\r\n\r\n../../.yarn/cache/@trpc-server-npm-9.8.1-katt-issue-1020-pin-2021-09-27-12-36-16.6-cdb5a7a4be-e62c21a45b.zip/node_modules/@trpc/server/dist/declarations/src/http/internals/types.d.ts:1:23 - error TS2688: Cannot \r\nfind type definition file for 'node'.\r\n\r\n1 /// \u003Creference types=\"node\" />\r\n ~~~~\r\n\r\n../../.yarn/cache/@trpc-server-npm-9.8.1-katt-issue-1020-pin-2021-09-27-12-36-16.6-cdb5a7a4be-e62c21a45b.zip/node_modules/@trpc/server/dist/declarations/src/subscription.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.\r\n\r\n1 /// \u003Creference types=\"node\" />\r\n ~~~~\r\n\r\n../../.yarn/cache/tarn-npm-3.0.1-afc495be8f-c7347ce8c4.zip/node_modules/tarn/dist/Pool.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.\r\n\r\n1 /// \u003Creference types=\"node\" />\r\n ~~~~\r\n\r\n\r\nFound 9 errors.\r\n```\r\n\r\nThe one place I refer to the server from my client is in one file:\r\n\r\n```ts\r\nimport type { AppRPCRouter } from \"@ski/server/src/api/router\";\r\nimport { createReactQueryHooks } from \"@trpc/react\";\r\n\r\nexport const trpc = createReactQueryHooks\u003CAppRPCRouter>();\r\n```\r\n\r\nI'm not sure what's going on here, as it looks like typescript is trying to build (or typecheck) the server files, but then doesn't have the correct local packages to be able to do this (objection is the ORM I'm using on the server).\r\n\r\nHow would I go about fixing this?\r\n\r\nThanks!",[],1022,"Typescript errors when building","2022-10-04T18:08:08Z","https://github.com/trpc/trpc/issues/1022",0.6934752,{"description":3113,"labels":3114,"number":3115,"owner":3026,"repository":3026,"state":3056,"title":3116,"updated_at":3117,"url":3118,"score":3119},"### Provide environment information\r\n\r\n```\r\n\r\n System:\r\n OS: macOS 12.5.1\r\n CPU: (8) arm64 Apple M1\r\n Memory: 157.83 MB / 16.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node\r\n Yarn: 1.22.19 - /opt/homebrew/bin/yarn\r\n npm: 8.19.1 - ~/.nvm/versions/node/v16.17.0/bin/npm\r\n Watchman: 2022.09.12.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Brave Browser: 106.1.44.105\r\n Chrome: 105.0.5195.125\r\n Firefox: 105.0.1\r\n Safari: 16.0\r\n npmPackages:\r\n @trpc/react: ^10.0.0-proxy-beta.15 => 10.0.0-proxy-beta.15\r\n react: 18.0.0 => 18.0.0 \r\n typescript: ~4.7.4 => 4.7.4 \r\n\r\n```\r\n\r\n### Describe the bug\r\n\r\nIf I create a trpc react proxy and client like:\r\n\r\n```typescript\r\nexport const trpc = createTRPCReact\u003CUserRouter>()\r\nexport const trpcClient: TRPCClient\u003CUserRouter> = trpc.createClient({\r\n links: [\r\n httpBatchLink({\r\n url: \"http://localhost:3000/user\"\r\n }),\r\n ],\r\n})\r\n```\r\n\r\nAnd try to use the `trpcClient` directly, it does not have the correct types:\r\n\r\n```typescript\r\n const createAccountResult = await trpcClient.mutation(\"account.create\")\r\n```\r\n\r\nWill return: `TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.`\r\n\r\n### Link to reproduction\r\n\r\nhttps://stackblitz.com/github/trpc/examples-next-minimal-starter\r\n\r\n### To reproduce\r\n\r\nSee above\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [X] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[],2922,"bug: `TRPCClient` from `createTRPCReact\u003CRouterType>().createClient` is incorrectly typed","2022-10-05T23:29:07Z","https://github.com/trpc/trpc/issues/2922",0.6948165,["Reactive",3121],{},["Set"],["ShallowReactive",3124],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fRmt55Ff_CoRhwKJaJKSNcwM0nVcC-RzCAl2gIHZ_nyQ":-1},"/trpc/trpc-openapi/399"]