Skip to content
Advertisement

error TS2688: Cannot find type definition file for ‘ioredis’

I have a project with nestJS. But in when trying to add some module it show error.

JavaScript

and this is my tsconfig

JavaScript

How to resolve the error ?

Advertisement

Answer

If you’re on ioredis@4, it comes without built-in TypeScript definitions. You’ll have to install @types/ioredis:

JavaScript

If you’re on ioredis@5 and use @nestjs/bull, the bull package does not support ioredis@5. You’ll have to downgrade ioredis:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement