Open HCLQ opened 4 years ago
Could you please provide a very minimal project (zip, github repo, or set of files) where this fails so we can reproduce the issue?
Hi, when i run 'npx tsc', I also received an errors like "Invalid module name in augmentation. Module 'koa' resolves to an untyped module at 'xxxxxxxxx/node_modules/koa/lib/application.js', which cannot be augmented"
import Koa from 'koa';
import Router from "koa-router";
import koaBody from 'koa-body';
const router = new Router() const app = new Koa();
app.use(koaBody()).use(router.routes());
app.listen(3000)
$ npx tsc demo.ts
## result
../node_modules/koa-body/index.d.ts:4:16 - error TS2665: Invalid module name in augmentation. Module 'koa' resolves to an untyped module at '/Users/***/node_modules/koa/lib/application.js', which cannot be augmented.
4 declare module "koa" {
```
## Version
```
koa-body: 4.2.0
Koa: 2.13.0
Node.js: 12.22.1
TypeScript: 4.1.3
```
Problem/Feature Request Summary
Environment Information
Current Behavior
see the error
node_modules/koa-body/index.d.ts:4:16 - error TS2665: Invalid module name in augmentation. Module 'koa' resolves to an untyped module at '/Users/hcl/code/node/yapi/vender/node_modules/koa/lib/application.js', which cannot be augmented.
4 declare module "koa" {