Skip to content

A type annotation is necessary. #121

Description

@ReptoxX

What version of Elysia is running?

No response

What platform is your computer?

No response

What steps can reproduce the bug?

export const jwtPlugin = new Elysia({ name: "jwtService", seed: { type: "jwt" as const, secret: env.JWT_SECRET } }).use(
	jwt({
		name: "jwt",
		secret: env.JWT_SECRET,
	}),
);

What is the expected behavior?

No response

What do you see instead?

The inferred type of 'jwtPlugin' cannot be named without a reference to '.pnpm/jose@6.1.3/node_modules/jose'. This is likely not portable. A type annotation is necessary.

Additional information

When using the jwt plugin inside my auth plugin that should handle the user authentication through bearer tokens, i get this issue.

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

Yes!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions