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

Typescript error with elysia 0.5.8 #1

Closed
floydjones1 opened this issue May 27, 2023 · 7 comments
Closed

Typescript error with elysia 0.5.8 #1

floydjones1 opened this issue May 27, 2023 · 7 comments

Comments

@floydjones1
Copy link

I'm getting typescript errors when using cors with elysia
Screenshot 2023-05-27 at 10 58 34 AM

@SaltyAom
Copy link
Member

Have you try removing node_modules, bun.lockb and reinstall? Restart IDE if need.

elysiajs/elysia#29

@floydjones1
Copy link
Author

I've tried deleting node_modules bun.lockb and reinstall but I see the same error.
Also tried doing it with yarn install and get the same error. Let me know if you need anymore information

@floydjones1
Copy link
Author

I've restarted the IDE after each fresh install aswell.

@floydjones1
Copy link
Author

Its happening from the swagger package aswell.... I'm stumped

@SaltyAom
Copy link
Member

SaltyAom commented May 28, 2023

I can't seem to be able to replicate it on my end.

Can you verify something for me that the fresh install is actually using a fresh install not a cached one:

To verify, can you please go into node_modules/@elysiajs/cors, the correct results should be no node_modules folder inside, but if so, can you please go inside the node_modules/@elysiajs/cors/node_modules/elysia/package.json and see if the version match your installed version.

If the version is matched and you still get some errors, I might need some more information in regard to this problem.

What version of the following are you using:

  • Elysia
  • Elysia CORs
  • Elysia Swagger
  • Bun
  • TypeScript

And what OS and version are you running on?

@floydjones1
Copy link
Author

floydjones1 commented May 29, 2023

Screenshot 2023-05-29 at 3 29 50 PM

The above picture shows there is no node_modules folder inside node_modules/@elysiajs/cors
Below is my package.json dependencies and bun version:

Screenshot 2023-05-29 at 3 31 35 PM

Currently seeing this on Macbook Air M1 2020

@floydjones1
Copy link
Author

upgrading to these seems to work then. Not sure what changed but thanks @SaltyAom

"dependencies": {
    "@elysiajs/cors": "0.5.2",
    "@elysiajs/swagger": "0.5.2",
    "@tgwf/co2": "0.13.4",
    "bun-types": "0.6.7",
    "elysia": "0.5.15",
    "typescript": "5.0.4"
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants