I'm trying to set up a node project in typescript.
Two files causing errors :
- node_modules@types\mongoose\index.d.ts
- node_modules\mongoose\index.d.ts
[errors][1] [1]: https://i.stack.imgur.com/46vDU.jpg
node_modules/@types/mongoose/index.d.ts:79:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: DocumentDefinition, FilterQuery, UpdateQuery, NativeError, Mongoose, CastError, ConnectionOptions, Collection, Connection, disconnected, connected, connecting, disconnecting, uninitialized, Error, QueryCursor, VirtualType, Schema, SchemaTypeOpts, Subdocument, Array, DocumentArray, Buffer, ObjectIdConstructor, Decimal128, Map, Aggregate, SchemaType, Document, ModelUpdateOptions
79 declare module "mongoose" {
node_modules/mongoose/index.d.ts:1:1
1 declare module "mongoose" {
~~~~~~~
Conflicts are in this file.
node_modules/@types/mongoose/index.d.ts:226:14 - error TS2403: Subsequent variable declarations must have the same type. Variable 'SchemaTypes' must be of type 'typeof Types', but here has type 'typeof Types'.
226 export var SchemaTypes: typeof Schema.Types;
~~~~~~~~~~~