Closed knockkk closed 2 years ago
hi @knockkk what did you do to resolve this? I'm getting the same issue doing import * as KoaRouter from "@koa/router";
hi @knockkk what did you do to resolve this? I'm getting the same issue doing
import * as KoaRouter from "@koa/router";
if you are using typescript, try to add "esModuleInterop": true in your tsconfig.json
node.js version: v17.0.1
npm/yarn and version: yarn 1.22.15
@koa/router
version: 10.1.1koa
version: 2.13.4Code sample:
Expected Behavior:
no error
Actual Behavior:
TypeError: router_1.default is not a constructor
Additional steps, HTTP request details, or to reproduce the behavior or a test case: