I'm trying to load media (image and videos) from Cloudinary in a NextJS App, I'm following the API documentation and my code is basically the same as the examples in the docs.
my code:
import { Cloudinary } from "@cloudinary/url-gen";
import { AdvancedImage as Image } from "@cloudinary/react";
interface CloudinaryMediaProps {
id?: string;
}
export const CloudinaryMedia: FC<CloudinaryMediaProps> = () => {
const myCld = new Cloudinary({
cloud: {
cloudName: "cloudinary-workspace",
},
});
const myImage = myCld.image("image");
return (
<div>
<Image cldImg={myImage} />
</div>
);
};
With this simple example, I'm getting the following error:
Unhandled Runtime Error
TypeError: Cannot add property __, object is not extensible
Cloudinary error: Cannot add property __, object is not extensible
Does someone know how can I resolve this error? Or if I'm missing something?