Cloudinary might be configuring before loading the env variable..... hence when I added following line in top of the file... Now it's working properly
import dotenv from 'dotenv'
dotenv.config()
alternative way, You can try configuring the cloudinary in entry file(e.g. index.js)