I was trying to make a API using mongodb realm functions, and I’ve correctly added/installed dependency named jsonwebtoken
exports = async function(arg){
const jwt = require("jsonwebtoken")
let res = jwt.verify("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiI4WEFxeWhMWEFwYUp6NmtIem51QmFwTUp0WVA0In0.XPwOjkCLR7TD0KjJtke1UwKbc-mXZQDNkClojffXXxs", "secret1")
return res
};
The code above successfully returns { uid: '8XAqyhLXApaJz6kHznuBapMJtYP4' }
when run normally using nodejs CLI/Interpreter.
But here it fails, I get this result
> ran at 1671900424456
> took
> error:
{"message":"Value is not an object: undefined","name":"TypeError"}
Plz help I’m stuck here is the screenshot of the same