I'm trying to use bcryptjs
package in my React project. I'm getting following error:
Could not find a declaration file for module 'bcryptjs'. ‘…/node_modules/bcryptjs/index.js'
implicitly has an 'any' type.
Try `npm i --save-dev @types/bcryptjs` if it exists or add a new declaration (.d.ts)
file containing `declare module 'bcryptjs';`
Running npm i --save-dev @types/bcryptjs
makes import error to go away but when I try to use variables from the package, they are not found.
NodeJS version is node v16.17.0
and TS is use as well.
How can I fix it? Thanks