8000 Path is missing from context · Issue #1185 · elysiajs/elysia · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Path is missing from context #1185
Open
@shayneo

Description

@shayneo

What version of Elysia is running?

1.3.0

What platform is your computer?

Darwin 24.4.0 arm64 arm

What steps can reproduce the bug?

  • Try to reference the path from the context
  • see that it is undefined
  • see simple example below
import { Elysia, t } from "elysia";

const app = new Elysia()
  .get("/things/:thingId", (ctx) => {
    return {
      path: ctx.path ?? null,
      thingId: ctx.params.thingId,
    };
  }, {
    params: t.Object({
      thingId: t.String(),
    }),
  })
  .listen(3000);

What is the expected behavior?

ctx.path would be a string, ie /things/:thingId

What do you see instead?

ctx.path is undefined

Additional information

This pattern worked in 1.2.x versions

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

yes

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreviewWaiting for issue reporter approval

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0