Open jim-king-2000 opened 3 months ago
Facing same issue! what happened?
For me, not working with even 9.0.0. I can access other functions such as decode
I started experiencing this problem after I switched to using ESM modules on my code. The solution, as the error message suggests, was to stop using named exports and rely on the default import syntax.
It can be written like this
import jwt from 'jsonwebtoken'; const { sign, verify } = jwt;
I just commented @ts-ignore
before calling verify method and it all started working. Weird. Can anyone tell me what might be the issue? Using Nitro server.
Description
import
jsonwebtoken
throws errorReproduction
The code:
The error message:
It works on v9.0.0 but fails on 9.0.2.
Environment