Skip to content

Memoirist should be a runtime dependency #1221

Open
@RafalGoslawski

Description

@RafalGoslawski

What version of Elysia is running?

1.3.1

What platform is your computer?

No response

What steps can reproduce the bug?

Bundle an app using elysia using bun build

What is the expected behavior?

The app should build.

What do you see instead?

Error:

error: Could not resolve: "memoirist". Maybe you need to "bun install"?
    at [...]/node_modules/elysia/dist/bun/index.js:2:553

Additional information

Offending line:

import { Memoirist } from 'memoirist'

Looks like the commit 7e2f35b moved it into devDependencies despite the fact it is used in

elysia/src/index.ts

Lines 276 to 284 in 9ba8551

router = {
'~http': undefined as
| Memoirist<{
compile: Function
handler?: ComposedHandler
}>
| undefined,
get http() {
if (!this['~http']) this['~http'] = new Memoirist({ lazy: true })
.

Have you try removing the node_modules and bun.lockb and try again yet?

yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions