I'm having problems with cloudinary configurations in my react app. I installed the library and created a cloudinary file like this:
cloudinary.js
import { v2 as cloudinary } from 'cloudinary';
import * as dotenv from 'dotenv';
dotenv.config();
cloudinary.config({
cloud_name: process.env.CLOUD_NAME,
api_key: process.env.CLOUD_API_KEY,
api_secret: process.env.CLOUD_API_SECRET,
secure: true
});
export default cloudinary;
My .env file:
CLOUD_NAME=d*******c
CLOUD_API_KEY=8***********8
CLOUD_API_SECRET=j*************************A
I'm using netlify to deploy. When I'm trying to use cloudinary in other file with import cloudinary from "...";
I'm getting an error like below:
Can someone help? Thanks in advance!
It depends on what you used for setting up the project.