\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.658635,{"description":2948,"labels":2949,"number":2954,"owner":2857,"repository":2857,"state":2882,"title":2955,"updated_at":2956,"url":2957,"score":2958},"Hello all,\r\n\r\nI'm trying to set up a demo monorepo full ESM + TypeScript and I want to use trpc for the API part. 👌 \r\nI currently have an issue when generating declaration types for the project:\r\n\r\n```\r\nsrc/router.ts:6:14 - error TS2742: The inferred type of 'appRouter' cannot be named without a reference to '../../../node_modules/@trpc/server/dist/internals/procedure.js'. This is likely not portable. A type annotation is necessary.\r\n```\r\n\r\nRelated code is here: https://github.com/jgoux/acme/blob/main/apps/api/src/router.ts#L6\r\n\r\nTo reproduce run these commands:\r\n```bash\r\nyarn\r\nyarn workspace @acme/api build\r\n```\r\n\r\nNote that I'm using `@trpc/server@10.0.0-alpha.22`, the stable version wasn't correctly importable with ESM, discussion about it here: https://discord.com/channels/867764511159091230/894984069291581511/979830057994432522\r\n\r\nWhat's funny is that the `tsc --noEmit` is fine and doesn't report the error. 😂 \r\n\r\nI'm not sure what to do about this particular TS error, this is a new one to me. 🤔 ",[2950,2953],{"name":2951,"color":2952},"wontfix","ffffff",{"name":2913,"color":2914},1945,"Error TS2742 when generating declaration types with trpc.router","2022-10-04T06:08:55Z","https://github.com/trpc/trpc/issues/1945",0.6604741,["Reactive",2960],{},["Set"],["ShallowReactive",2963],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fnDyEkouKw_jUGBVAsc-VjQO9H-xW-4-ouCy8aD5Evko":-1},"/trpc/trpc/1927"]