Crawling-Infrastructure icon indicating copy to clipboard operation
Crawling-Infrastructure copied to clipboard

cd ../lib/ tsc error

Open leadscloud opened this issue 4 years ago • 2 comments

$ tsc
../lib/node_modules/@types/mongoose/index.d.ts:78:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: Omit, DocumentDefinition, MongooseFilterQuery, FilterQuery, MongooseUpdateQuery, UpdateQuery, NativeBuffer, NativeDate, NativeError, Mongoose, CastError, ConnectionBase, Connection, disconnected, connected, connecting, disconnecting, uninitialized, Error, QueryCursor, VirtualType, Schema, MongooseDocument, Subdocument, Array, DocumentArray, Buffer, ObjectIdConstructor, Decimal128, Embedded, Map, Query, DocumentQuery, mquery, Aggregate, SchemaType, Document

78 declare module "mongoose" {
   ~~~~~~~

  node_modules/@types/mongoose/index.d.ts:79:1
    79 declare module "mongoose" {
       ~~~~~~~
    Conflicts are in this file.

../lib/node_modules/@types/mongoose/index.d.ts:160:14 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'mongo' must be of type 'typeof import("I:/Crawling-Infrastructure-master/master/node_modules/@types/mongodb/index")', but here has type 'typeof import("I:/Crawling-Infrastructure-master/lib/node_modules/@types/mongodb/index")'.

160   export var mongo: typeof mongodb;
                 ~~~~~

  node_modules/@types/mongoose/index.d.ts:228:14
    228   export var mongo: typeof mongodb;
                     ~~~~~
    'mongo' was also declared here.

../lib/node_modules/@types/mongoose/index.d.ts:1138:5 - error TS2374: Duplicate string index signature.

1138     [path: string]: SchemaTypeOpts<any> | Schema | SchemaType;
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../lib/node_modules/@types/mongoose/index.d.ts:1274:5 - error TS2374: Duplicate string index signature.

1274     [other: string]: any;
         ~~~~~~~~~~~~~~~~~~~~~

../lib/node_modules/@types/mongoose/index.d.ts:3576:5 - error TS2374: Duplicate string index signature.

3576     [k: string]: string;
         ~~~~~~~~~~~~~~~~~~~~

../lib/node_modules/@types/mongoose/index.d.ts:3642:5 - error TS2374: Duplicate string index signature.

3642     [other: string]: any;
         ~~~~~~~~~~~~~~~~~~~~~

node_modules/@types/mongoose/index.d.ts:79:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: Omit, DocumentDefinition, MongooseFilterQuery, FilterQuery, MongooseUpdateQuery, UpdateQuery, NativeBuffer, NativeDate, NativeError, Mongoose, CastError, ConnectionBase, Connection, disconnected, connected, connecting, disconnecting, uninitialized, Error, QueryCursor, VirtualType, Schema, MongooseDocument, Subdocument, Array, DocumentArray, Buffer, ObjectIdConstructor, Decimal128, Embedded, Map, Query, DocumentQuery, mquery, Aggregate, SchemaType, Document

79 declare module "mongoose" {
   ~~~~~~~

  ../lib/node_modules/@types/mongoose/index.d.ts:78:1
    78 declare module "mongoose" {
       ~~~~~~~
    Conflicts are in this file.

node_modules/@types/mongoose/index.d.ts:3799:13 - error TS2320: Interface 'CollectionBase' cannot simultaneously extend types 'Collection<any>' and 
'Collection<any>'.
  Named property 'bulkWrite' of types 'Collection<any>' and 'Collection<any>' are not identical.

3799   interface CollectionBase extends mongodb.Collection {
                 ~~~~~~~~~~~~~~

node_modules/@types/mongoose/index.d.ts:3799:13 - error TS2320: Interface 'CollectionBase' cannot simultaneously extend types 'Collection<any>' and 
'Collection<any>'.
  Named property 'rename' of types 'Collection<any>' and 'Collection<any>' are not identical.

3799   interface CollectionBase extends mongodb.Collection {
                 ~~~~~~~~~~~~~~

node_modules/@types/mongoose/index.d.ts:3799:13 - error TS2320: Interface 'CollectionBase' cannot simultaneously extend types 'Collection<any>' and 
'Collection<any>'.
  Named property 'update' of types 'Collection<any>' and 'Collection<any>' are not identical.

3799   interface CollectionBase extends mongodb.Collection {
                 ~~~~~~~~~~~~~~

node_modules/@types/mongoose/index.d.ts:3799:13 - error TS2320: Interface 'CollectionBase' cannot simultaneously extend types 'Collection<any>' and 
'Collection<any>'.
  Named property 'updateMany' of types 'Collection<any>' and 'Collection<any>' are not identical.

3799   interface CollectionBase extends mongodb.Collection {
                 ~~~~~~~~~~~~~~

node_modules/@types/mongoose/index.d.ts:3799:13 - error TS2320: Interface 'CollectionBase' cannot simultaneously extend types 'Collection<any>' and 
'Collection<any>'.
  Named property 'updateOne' of types 'Collection<any>' and 'Collection<any>' are not identical.

3799   interface CollectionBase extends mongodb.Collection {
                 ~~~~~~~~~~~~~~

node_modules/@types/mongoose/index.d.ts:3799:13 - error TS2320: Interface 'CollectionBase' cannot simultaneously extend types 'Collection<any>' and 
'Collection<any>'.
  Named property 'watch' of types 'Collection<any>' and 'Collection<any>' are not identical.

3799   interface CollectionBase extends mongodb.Collection {
                 ~~~~~~~~~~~~~~


Found 13 errors.

leadscloud avatar Jun 23 '20 02:06 leadscloud

when i rm -rf ../lib/node_modules

get this error

cd master
tsc
../lib/dist/misc/logger.d.ts:1:24 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

1 import { Logger } from 'winston';
                         ~~~~~~~~~

../lib/dist/misc/logger.d.ts:2:24 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

2 export { Logger } from 'winston';
                         ~~~~~~~~~

../lib/dist/storage/storage.d.ts:2:17 - error TS2307: Cannot find module 'aws-sdk' or its corresponding type declarations.

2 import AWS from 'aws-sdk';
                  ~~~~~~~~~

../lib/misc/helpers.ts:4:18 - error TS2307: Cannot find module 'glob' or its corresponding type declarations.

4 import glob from 'glob';
                   ~~~~~~

../lib/misc/helpers.ts:5:27 - error TS2307: Cannot find module 'detect-newline' or its corresponding type declarations.

5 import detectNewline from 'detect-newline';
                            ~~~~~~~~~~~~~~~~

../lib/misc/helpers.ts:23:23 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.

23 export async function chunkRead(path: string, callback: any, chunk_size=5242880) {
                         ~~~~~~~~~

../lib/misc/logger.ts:7:30 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

7 import {format, Logger} from 'winston';
                               ~~~~~~~~~

../lib/misc/logger.ts:10:26 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

10 import * as winston from 'winston';
                            ~~~~~~~~~

../lib/misc/logger.ts:12:24 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

12 export { Logger } from 'winston';
                          ~~~~~~~~~

../lib/storage/storage.ts:4:17 - error TS2307: Cannot find module 'aws-sdk' or its corresponding type declarations.

4 import AWS from 'aws-sdk'
                  ~~~~~~~~~


Found 10 errors.

leadscloud avatar Jun 23 '20 03:06 leadscloud

rm ../lib/node_modules/@types/mongoose

fix these error

leadscloud avatar Jun 23 '20 03:06 leadscloud