Comments (6)
Hi @alamgir8, if you are using react (front-end) import cloudinary from "cloudinary/lib/cloudinary";
you can't configure cloudinary using node.js code cloudinary.config({ cloud_name...
if you want to delete assets from the client side, please refer to the docs here: https://cloudinary.com/documentation/upload_images#deleting_client_side_uploaded_assets
Subject: Regarding Cloudinary Configuration and Client-Side Asset Deletion
Hi @alamgir8, if you are using React on the front-end, the following import statement is typically used to import the Cloudinary library:
import cloudinary from "cloudinary/lib/cloudinary";
However, it is important to note that configuring Cloudinary using Node.js code, specifically cloudinary.config({ cloud_name...
, is not compatible with the front-end implementation in React.
Regarding the deletion of assets from the client side, we recommend referring to our documentation, which provides detailed instructions on the process. You can find the relevant information at the following link:https://cloudinary.com/documentation/upload_images#deleting_client_side_uploaded_assets
Thanks
-Tamara
from cloudinary_npm.
Hi @alamgir8, Thanks for reporting. Could you please share a bit more details about what isn't working once you upgraded to Node JS version 18? Do you have trouble installing the SDK or any errors during runtime etc?
from cloudinary_npm.
Hi @aleksandar-cloudinary I'm trying to delete an image from the client side in react app and my configuration is like this
import cloudinary from "cloudinary/lib/cloudinary";
cloudinary.config({
cloud_name: import.meta.env.VITE_APP_CLOUD_NAME,
api_key: import.meta.env.VITE_APP_CLOUDINARY_API_KEY,
api_secret: import.meta.env.VITE_APP_CLOUDINARY_API_SECRET,
});
and inside the delete function calling the Cloudinary uploader to destroy/delete the image
await cloudinary.v2.uploader.destroy(public_id);
It worked properly on Node version 16 but did not work on Node version 18
And the error is this
Uncaught TypeError: Cannot read properties of undefined (reading 'node') at node_modules/cloudinary/lib/utils/index.js (index.js:69:84) at __require2 (chunk-WQG2LZMB.js?v=6276bb8f:16:50) at node_modules/cloudinary/lib/cloudinary.js (cloudinary.js:3:17) at __require2 (chunk-WQG2LZMB.js?v=6276bb8f:16:50) at cloudinary_lib_cloudinary.js?v=6276bb8f:6:16
from cloudinary_npm.
Hi @alamgir8 , you can try updating your Cloudinary library to the latest version. Please try running the following command in your project directory npm install cloudinary@latest
or if you are using yarn, you can run: yarn add cloudinary@latest
.This will update the Cloudinary library to the latest version available.
Additionally, if you are using any other dependencies or plugins alongside Cloudinary, ensure that they are also compatible with Node.js 18 and up-to-date.
Please let me know if the issue was resolved.
from cloudinary_npm.
Hi @tamaracloudinary i'm using Cloudinary latest version "cloudinary": "^1.37.1",. Also tried to re-install this npm install cloudinary@latest, but still had the same issue, it crashed the app.
And all other packages are compatible with Node 18, I checked that..
from cloudinary_npm.
Hey @alamgir8 any chance you can send us a reproducible environment for us to test in?
from cloudinary_npm.
Related Issues (20)
- Remove the Node.js 6 support HOT 1
- Custom Analytics IDs Don't Produce Custom Code HOT 1
- Wrong response type from https://api.cloudinary.com/v1_1/<cloud>/auto/upload HOT 4
- Webpack on nextjs always throws depency warnings HOT 27
- Cloudinary API corrupts UTF-8 public IDs/file names HOT 2
- Invalid signature HOT 2
- Error while uploading profile image Cannot read properties of undefined (reading 'path') HOT 1
- Property 'next_cursor' does not exist on type 'ResourceApiResponse' HOT 2
- Missing`upload_stream` documentation HOT 6
- Escaping overlay text seems impossible in the version 1.41.0 HOT 6
- Unexpected token < in JSON at position 0. Status code 500 in Nextjs 13 production build (App router) HOT 9
- Support passing in analytics product version to URL generation HOT 2
- Typescript error on search API HOT 2
- Invalid signature String to sign HOT 2
- Cloudinary.com Signup Process HOT 3
- Missing return types on v2.api.resources() HOT 4
- Uploading file as buffer does not works in production. HOT 17
- "Error: must supply api_key" in heroku log HOT 3
- mp3 file is not being deleted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudinary_npm.