I am getting this error while i run npm i.
../@types/mongoose/index.d.ts:191:17 - error TS2694: Namespace '"/Users/test-service/node_modules/@types/mongodb/index"' has no exported member 'OptionalId' ? mongodb.OptionalId & { _id: TId }>
I am using "@types/mongoose": "^5.5.32", "@types/mongodb": "~3.3.1". Can someone help me solving this problem. my tsc version is Version 3.8.3 .
I just solved the problem by running this command.
npm install --save @types/mongodb
Hope this can help you.
my project node_modules like this,
@types/mongoose has @types/mongodb dependencie, and it has conflict with @types/mongodb.
Run this command at your node_modules directory:
$ rm -rf node_modules/@types/mongoose/node_modules/@types/mongodb
Done.
Hope to help someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With