Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.87 KB

readme.md

File metadata and controls

44 lines (27 loc) · 1.87 KB

Validation libs:

See also:

trpc

FAQ:

Problems and solutions

Cannot find module

pnpm run build results with Error:

node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/trpc-openapi/dist/adapters/aws-lambda.d.ts:2:46 - error TS2307: Cannot find module 'aws-lambda' or its corresponding type declarations.

2 import type { Context as APIGWContext } from 'aws-lambda';
                                               ~~~~~~~~~~~~

node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/trpc-openapi/dist/adapters/fastify.d.ts:2:33 - error TS2307: Cannot find module 'fastify' or its corresponding type declarations.

2 import { FastifyInstance } from 'fastify';
                                  ~~~~~~~~~

node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/trpc-openapi/dist/adapters/next.d.ts:1:49 - error TS2307: Cannot find module 'next' or its corresponding type declarations.

1 import { NextApiRequest, NextApiResponse } from 'next';

Problem with trpc-openapi library and solution is to include skipLibCheck": true info tsconfig.json. https://stackoverflow.com/a/65136209/1189832

ts-node-dev: Error: Must use import to load ES Module

Solution: wclr/ts-node-dev#314

Use this instead of ts-node-dev: ts-node --experimental-specifier-resolution=node --esm ./src/index.ts.