ditto icon indicating copy to clipboard operation
ditto copied to clipboard

Please Keep Update Package

Open rupamking1 opened this issue 3 years ago • 9 comments

Please Keep Update Package

rupamking1 avatar Jul 10 '21 15:07 rupamking1

Do you have any feature request or bug report?

lihaibh avatar Jul 11 '21 05:07 lihaibh


node_modules/mongodb-snapshot/dist/connectors/mongodb/MongoDBDuplexConnector.d.ts:2:10 - error TS2305: Module '"mongodb"' has no exported member 'FilterQuery'.

2 import { FilterQuery } from "mongodb";
           ~~~~~~~~~~~
node_modules/mongodb-snapshot/dist/connectors/mongodb/MongoDBDuplexConnector.d.ts:79:114 - error TS2694: Namespace '"/Users/danielehrhardt/projects/mefra/accounting-api/node_modules/mongodb/mongodb"' has no exported member 'BulkWriteOpResultObject'.

79     writeCollectionDocuments(collectionName: string, documents: [CollectionDocument]): Promise<import("mongodb").BulkWriteOpResultObject>;
                                                                                                                    ~~~~~~~~~~~~~~~~~~~~~~~

Found 2 error(s).

danielehrhardt avatar Jul 27 '21 19:07 danielehrhardt

@danielehrhardt are you trying to compile this library or just using it?

lihaibh avatar Jul 29 '21 10:07 lihaibh

@danielehrhardt are you trying to compile this library or just using it?

Just using it

danielehrhardt avatar Jul 29 '21 10:07 danielehrhardt

@danielehrhardt are you running the program as ts-node or node? can you give more details?

lihaibh avatar Jul 29 '21 10:07 lihaibh

I've the same issue, it appeared with mongoose update: https://github.com/tf2pickup-org/server/pull/1263/checks?check_run_id=3875208722

garrappachc avatar Oct 12 '21 21:10 garrappachc

@garrappachc how can we fix it? can you open a pull request?

lihaibh avatar Oct 13 '21 14:10 lihaibh

It's a matter of mongodb changing its API, thus mongodb-snapshot is not compatible with version 4 and above. This line, for example, imports FilterQuery that no longer exists.

garrappachc avatar Oct 13 '21 18:10 garrappachc

@garrappachc basically it just types and im not exporting it, so i wonder if by using "any" i can resolve this issue. Maybe we should upgrade only "@types/mongodb" on package.json? The library is meant to support both mongodb v3 and v4.

lihaibh avatar Dec 25 '21 14:12 lihaibh