Skip to content

stop doesn't work and throws an error #1014

Open
@ashokgelal

Description

@ashokgelal

What version of Elysia is running?

1.2.0

What platform is your computer?

Darwin 24.1.0 arm64 arm

What steps can reproduce the bug?

I'm using node adapter and when calling stop it throws this.server.stop is not a function error.

Code snippet:

    const app = new Elysia({adapter: node()})
        .listen(3000)
    setTimeout(() => {
        console.log('Stopping server after 5 secs')
        app.stop()
    }, 5000)

What is the expected behavior?

It should stop the server listening to request.

What do you see instead?

UnhandledPromiseRejectionWarning: TypeError: this.server.stop is not a function

Additional information

No response

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