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

Latest version doesn't work #11

Open
grctest opened this issue Sep 22, 2023 · 2 comments
Open

Latest version doesn't work #11

grctest opened this issue Sep 22, 2023 · 2 comments

Comments

@grctest
Copy link

grctest commented Sep 22, 2023

Using the latest 0.7 elysia + 0.6 works, but using static 0.7 with .use(staticPlugin({ prefix: '/' })) causes the following warning in vscode:

No overload matches this call.
  The last overload gave the following error.
    Argument of type 'Promise<Elysia<"", { store: {}; request: {}; schema: {}; error: {}; meta: { schema: {}; defs: {}; exposed: {}; }; }>>' is not assignable to parameter of type 'Promise<{ default: (elysia: Elysia<any, any>) => Elysia<any, ElysiaInstance>; }>'.
      Property 'default' is missing in type 'Elysia<"", { store: {}; request: {}; schema: {}; error: {}; meta: { schema: {}; defs: {}; exposed: {}; }; }>' but required in type '{ default: (elysia: Elysia<any, any>) => Elysia<any, ElysiaInstance>; }'.ts(2769)
index.d.ts(198, 9): 'default' is declared here.
index.d.ts(197, 5): The last overload is declared here.

In the terminal it complains about config, but using .use(staticPlugin()) results in the same error.

@calumk
Copy link

calumk commented Sep 22, 2023

Latest version also not working for me

TypeError: undefined is not an object (evaluating 'X.config')
      at Y (/Volumes/Programming/2023_3/app/node_modules/elysia/dist/bun/index.js:272:25995)

@Ricki-BumbleDev
Copy link

I had the same problem. I fixed it by making sure I had the latest version of this package and elysia. If you use compatible versions in your package.json (marked with the ^) it's best to delete node_modules and the lock file and then install again, to make sure you are actually installing the latest versions.

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

3 participants