NestJS. TS7016: Could not find a declaration file for module 'rxjs'

956 Views Asked by At

TS7016: Could not find a declaration file for module 'rxjs'.'C:/Path/to/project/node_modules/rxjs/dist/cjs/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/rxjs if it exists or add a new declaration (.d.ts) file containing `declare module 'rxjs';

I have updated NestJs to version 8 and rxjs to 7. After that, imports stopped working. There was an index.ts file in the node_modules/rxjs folder before (in the 6th version). When installing the 7th version, it is removed.

1

There are 1 best solutions below

1
On

The problem was an outdated version of the typescript. After updating typescript, everything worked out.