0

enter image description here

i have started facing this issue after i installed clarifai API for project face recognition and i tried everything but can't find the solution. It shows this message when hovering on import clarifai:

Could not find a declaration file for module 'clarifai'

tried reinstalling clarifai and also node modules still didn't solve this

James Z
  • 12,209
  • 10
  • 24
  • 44
  • 1
    Does this answer your question? [Could not find a declaration file for module 'module-name'. '/path/to/module-name.js' implicitly has an 'any' type](https://stackoverflow.com/questions/41292559/could-not-find-a-declaration-file-for-module-module-name-path-to-module-nam) – Andy Ray Nov 02 '22 at 20:01

2 Answers2

0

A declaration file is only used in TypeScript projects. As your project is just plain JavaScript you can just ignore this error.

Also, Ive looked at the package and its neither written in TypeScript or has a package which provides types, eg @types/clarifai

So you can just ignore this error and move on with your project. This error is only gonna be an issue for TypeScript projects.

Red
  • 6,599
  • 9
  • 43
  • 85
0

Since your project is just plain JavaScript, you need to use HTTP to call the Clarifai API. You can refer to the JavaScript (REST) samples on the Clarifai documentation on how to call the face recognition API.

Jasoya
  • 66
  • 4