google-photos
google-photos copied to clipboard
code is not defined
Sorry in advance, im new to this...
i have a nextja app and am trying to use google-photos package together with the googleapis package (as recomeded for authorization) ... I am recieveing the following error: "ReferenceError: code is not defined" on: const {tokens} = await oauth2Client.getToken(code);
Any help would be much appreicated. Jon.
It's because it has been written in javascript and there's no support for typescript. You should use require
insted of import
.
✅ const Photos = require("googlephotos");
❌ import Photos from "googlephotos";
yeah this is something i've been meaning to fix. I need to add TS support 🤔