ditto
ditto copied to clipboard
Please Keep Update Package
Please Keep Update Package
Do you have any feature request or bug report?
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 are you trying to compile this library or just using it?
@danielehrhardt are you trying to compile this library or just using it?
Just using it
@danielehrhardt are you running the program as ts-node or node? can you give more details?
I've the same issue, it appeared with mongoose update: https://github.com/tf2pickup-org/server/pull/1263/checks?check_run_id=3875208722
@garrappachc how can we fix it? can you open a pull request?
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 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.