elysiajs / elysia

Ergonomic Framework for Humans
https://elysiajs.com
MIT License
9.73k stars 207 forks source link

cannot destructure in derive #744

Closed staciax closed 2 weeks ago

staciax commented 1 month ago

What version of Elysia.JS is running?

elysia@1.1.3 @elysiajs/bearer@1.1.1

What platform is your computer?

Darwin 23.5.0 arm64 arm (MacOS 14.5)

What steps can reproduce the bug?

import { bearer } from '@elysiajs/bearer';
import { Elysia } from 'elysia';

const app = new Elysia()
    .use(bearer())
    .get('/', ({ bearer }) => bearer)
    .listen(8080);

console.log(
    `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`,
);

What do you see instead?

{"name":"TypeError","message":"Right side of assignment cannot be destructured"}
QEDK commented 1 month ago

Facing the same issue, sadly. We were able to workaround the issue by downgrading to =1.1.2.

nephix commented 1 month ago

I have the same issue in 1.0.23

felipebdn commented 1 month ago

Enfrentando o mesmo problema, infelizmente. Conseguimos contornar o problema fazendo downgrade para =1.1.2.

Testei com essa versão e persiste o problema

SaltyAom commented 2 weeks ago

Does this problem still persists in the latest version (1.1.5)?

staciax commented 2 weeks ago

Does this problem still persists in the latest version (1.1.5)?

Sorry, I forgot to turn it off. It's working normally now. <3