Home > OS >  Could not find a declaration file for module 'clarifai'
Could not find a declaration file for module 'clarifai'

Time:11-03

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

CodePudding user response:

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.

CodePudding user response:

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.

  • Related