• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

220
Views
Cloudinary-React Could not find a declaration file for module 'cloudinary-react' - Not using TypeScript

I am trying to import { Image } from "cloudinary-react"; As instructed at Cloudinary-React

And getting the warning:

Could not find a declaration file for module 'cloudinary-react'. '/Users/myname/Web Projects/ProjectName/node_modules/cloudinary-react/dist/cloudinary-react.js' implicitly has an 'any' type. Try npm i --save-dev @types/cloudinary-react if it exists or add a new declaration (.d.ts) file containing declare module 'cloudinary-react';ts(7016)

I am not using TypeScript.

I can not figure out what is going on. Does anyone have any ideas how I can resolve this? I have looked around for a few hours.

Package.json: "dependencies": { "axios": "^0.21.1", "bcrypt": "^5.0.0", "cloudinary": "^1.27.1", "cloudinary-react": "^1.7.0", ...

Thank you for any help.

over 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The cloudinary-react module should normally be added in the node_modules when it is installed in your project. The following sample code is shown in this sample project.

For the dependencies in package.json:

"dependencies": {
    "cloudinary-react": "1.7.0",
    "lodash": "4.17.21",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-scripts": "4.0.0"
},

And Cloudinary components can be imported as shown below:

import React from "react";

import { Image } from "cloudinary-react";

class ImageDisplay extends React.Component {
  render() {
    return (
      <div className="counter">
        <Image cloudName="demo" publicId="sample" width="300" crop="scale" />
      </div>
    );
  }
}

export default ImageDisplay;
over 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error