Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.2.0 types does not work with Elysia v1.2.9 #61

Open
darkyelox opened this issue Jan 3, 2025 · 2 comments
Open

Version 1.2.0 types does not work with Elysia v1.2.9 #61

darkyelox opened this issue Jan 3, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@darkyelox
Copy link

darkyelox commented Jan 3, 2025

What version of Elysia is running?

1.2.9

What platform is your computer?

Linux 6.6.65-1-MANJARO x86_64 unknown

What steps can reproduce the bug?

Install Elysia latest version, by the time of publishing this is 1.2.9, install latest version of @elysiajs/cors which is 1.2.0, just create a simple Elysia plugin:

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

export const app = new Elysia()
  .use(cors({ // Here I get type errors about type missing Promise functions like then, catch, etc.
    origin: true,
  }))
  .listen(3000);

What is the expected behavior?

To use the latest version of elysia and @elysiajs/cors packages together.

What do you see instead?

I had to downgrade @elysiajs/cors to v1.1.1.

Additional information

Elysia official plugins should follow the same elysia version and publish at the same time

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

Yes

@darkyelox darkyelox added the bug Something isn't working label Jan 3, 2025
@idfunctor
Copy link

@SaltyAom is there anyone working on this? if not, can you add any context that might help me get started faster to fix this? thanks

@azxza
Copy link

azxza commented Mar 31, 2025

id like to add that ive had this issue as well, and according to my testing the fix is just to simply build the package with an updated version of elysia.
all tests still pass and the code seems to work just fine. i would love to open a PR for that myself but ill need to get push permissions for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants