Error TS6200 & Error TS2403: Definitions of the following identifiers conflict with those in another file
Mongoose includes TypeScript types since mongoose@5.11.0
, so you can remove the package @types/mongoose
.
I just had the same issue and fixed it by adding "skipLibCheck": true
to my tsconfig.json
. So I didn't have to downgrade Mongoose.
nevermindI downgraded mongoose by running 'npm i mongoose@5.10.19', it worked