elysiajs / elysia-swagger

A plugin for Elysia to auto-generate Swagger page
MIT License
84 stars 45 forks source link

Import named 'DEFS' not found in module #2

Closed alpap closed 1 year ago

alpap commented 1 year ago

With Elysia 0.2.6 this module fails looking for DEFS

Import named 'DEFS' not found in module

in index.ts line 1 import { type Elysia, SCHEMA, DEFS } from 'elysia'

SaltyAom commented 1 year ago

That's weird since DEFS was added in 0.2.0

Are you using bun create to scaffold the project? If change elysia to number version instead of latest in package.json?

From

{
    "dependency": {
        "elysia": "latest"
    }
}

To

{
    "dependency": {
        "elysia": "^0.2.7"
    }
}

Sometime Bun doesn't resolve the latest version by default for some reason.

Also if this work, can you verify that #3 is now missing? Since by default Elysia 0.2 include openapi-types by default, and as it's dependency, openapi-types should also be installed by default.

SaltyAom commented 1 year ago

Hi, seems like the issue has no further feedback, so I'm closing the thread.

If the issue still persists, feel free to re-open it with more information and feedback.