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

Invalid plugin type #28

Open
nodirbekrajaboff opened this issue May 28, 2024 · 0 comments
Open

Invalid plugin type #28

nodirbekrajaboff opened this issue May 28, 2024 · 0 comments

Comments

@nodirbekrajaboff
Copy link

######@##### server % pm2 logs 0
[TAILING] Tailing last 15 lines for [0] process (change the value with --lines option)
/Users/####/.pm2/logs/####-out.log last 15 lines:
/Users/####/.pm2/logs/####-error.log last 15 lines:
0|#### | 29628 | return this._use(plugin2);
0|#### | 29629 | if (typeof plugin2.default === "function")
0|#### | 29630 | return plugin2.default(this);
0|#### | 29631 | if (plugin2.default instanceof _Elysia)
0|#### | 29632 | return this._use(plugin2.default);
0|#### | 29633 | throw new Error('Invalid plugin type. Expected Elysia instance, function, or module with "default" as Elysia instance or function that returns Elysia instance.');
0|#### | ^
0|#### | error: Invalid plugin type. Expected Elysia instance, function, or module with "default" as Elysia instance or function that returns Elysia instance.
0|#### | at /Users/####/Desktop/projects/####/server/build/index.js:29633:15
0|#### |

import { Elysia } from "elysia";
import { staticPlugin } from "@elysiajs/static";

export const app = new Elysia()
  .use(staticPlugin())
  .listen(4040);

Script:

bun build ./src/index.ts --outdir ./build --target=node
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

1 participant