cloudinary / cloudinary_npm

Cloudinary NPM for node.js integration
625 stars 321 forks source link

question : Could not find a declaration file for module 'cloudinary' #292

Closed Moshmel closed 5 years ago

Moshmel commented 5 years ago

hello i am running nodejs express server, i have installed cloudinary via npm. i followed your docs and on the declaration of cloudinary it gives me this error

Could not find a declaration file for module 'cloudinary'. 'c:/../node_modules/cloudinary/cloudinary.js' implicitly has an 'any' type. Try npm install @types/cloudinary if it exists or add a new declaration (.d.ts) file containing declare module 'cloudinary';ts(7016)

how can i fix it? best regards

eyalktCloudinary commented 5 years ago

Hi @Moshmel. It looks like you're developing in TypeScript, which we currently do not support. Support for TS is currently on the works, and we'll let you know as soon as we have an ETA.

Moshmel commented 5 years ago

i have followed tutorials about it and i did everything the same but still i get this error on cloudinary:

Could not find a declaration file for module 'cloudinary'. 'c:/Users/melam/Desktop/work/instagram-clone/backend/node_modules/cloudinary/cloudinary.js' implicitly has an 'any' type. Try npm install @types/cloudinary if it exists or add a new declaration (.d.ts) file containing declare module 'cloudinary';ts(7016)

i am not doing anything special

my dependencies are: const express = require("express"); const bodyParser = require("body-parser"); var cloudinary = require('cloudinary').v2; const cors = require("cors"); const cookieParser = require("cookie-parser"); const session = require("express-session"); const fileUpload=require('express-fileupload');

not using ani cli or cra;

best regards

shirlymanor commented 5 years ago

@Moshmel As Eyal said we currently, don't support TS (it's on our road-map). If you want to use nodeJS you might want to try npm install cloudinary.

Moshmel commented 5 years ago

I am pretty new to nodejs and as far as i know i didn't use typescript in my server, i have already did npm install cloudinary, and you support nodejs, i have read cloudinary docs, and still i see the error that he cant find module.

thank you

michalkcloudinay commented 5 years ago

@Moshmel The error you are getting indicates that you have a TypeScript code in your server.
You can share your 'package.json' so we can help you find it. If privacy is an issue please feel free to open a support ticket at support@cloudinary.com.

michalkcloudinay commented 5 years ago

@Moshmel you can refer to the branch in the last comment in this issue: https://github.com/cloudinary/cloudinary_npm/issues/175. This should work for you.

Moshmel commented 5 years ago

hey guys... 10x for responding so fast :] the issue is fixed. for some reason it gave me this error but it is still working on the server side.

thanks a lot