Uncaught (in promise) Error: No access token in response
elcous opened this issue · 1 comments
elcous commented
Describe the bug
Error occurs when using this module in Deno environment
To Reproduce
Some steps involved to reproduce the bug and any code samples you can share.
import Nylas from "npm:nylas";
Nylas.config({
clientId: Deno.env.get("CLIENT_ID"),
clientSecret: Deno.env.get("CLIENT_SECRET"),
});
async function test() {
const code = "123";
Nylas.exchangeCodeForToken(code).then((token) => {
console.log(token);
});
}
Expected behavior
Error shouldn't occur
SDK Version:
6.10
Additional context
Most likely happens because of the bug here:
node-fetch/node-fetch#1725
That was fixed. Probably can just upgrade node-fetch version to >2.6.12
mrashed-dev commented
Thanks for opening this issue @elcous, just upgraded and the tests pass. Looks like we're good to upgrade!