flickr-sdk icon indicating copy to clipboard operation
flickr-sdk copied to clipboard

OAuth is not a constructor

Open abraao31 opened this issue 1 year ago • 1 comments

I followed the README, and my react-app returns me an error saying "OAuth is not a constructor":

code bellow FlickrService.js:

import FlickrConfig from "configs/FlickrConfig";
import { createFlickr } from "flickr-sdk";

const { upload } = createFlickr(FlickrConfig);

const FlickrService = {};

FlickrService.post = async (file) => {
    return upload(file, {
        title: "Works on MY machine!",
    });
};

export default FlickrService;

FlickrConfig.js:

const FlickrConfig = {
    consumerKey: "xxxxxxxxxxxxxx",
    consumerSecret: "xxxxxxxx",
    oauthToken: "xxxxxxxxxx",
    oauthTokenSecret: "xxxxxxxxxxxxxx"
  
export default FlickrConfig;

abraao31 avatar Dec 11 '24 14:12 abraao31

Ok, i found the error, somehow the classes are interfering each other, im usind ant-design on my project, and it have a class with same name declared with "var" i dont know if it change on the problem or not.

abraao31 avatar Dec 11 '24 14:12 abraao31