The types of 'options.autoEncrypter' are incompatible
See original GitHub issue-
I’m submitting a … [ ] bug report [x] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
-
Summary
When upgrading the mongodb dependency from 4.1.0
to 4.1.1
this is the TypeScript error:
Type 'import(".../node_modules/mongodb/mongodb").MongoClient' is
not assignable to type
'import(".../node_modules/connect-mongo/node_modules/mongodb/mongodb").MongoClient'.
The types of 'options.autoEncrypter' are incompatible between these types.
Type 'import(".../node_modules/mongodb/mongodb").AutoEncrypter |
undefined' is not assignable to type
'import(".../node_modules/connect-mongo/node_modules/mongodb/mongodb").AutoEncrypter |
undefined'.
I think that the fix is as simple as upgrading the dependency in package.json: https://github.com/jdesboeufs/connect-mongo/blob/3e273764c2b88da072a1eb2394ae70b5af158623/package.json#L62
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13 (9 by maintainers)
Top Results From Across the Web
how to use the mongo types used by mongoose in my code?
Types of property 'autoEncrypter' are incompatible. Type ... The types of 'options.credentials' are incompatible between these types.
Read more >Fix issue with OptionalId in typescript 4.5 - MongoDB Jira
NODE-3224autoEncryption with username password in connection string uri produces warning options credentials is not supported.
Read more >MongoDB PHP Extension 1.12.0 Released
The PHP team is happy to announce that version 1.12.0 of the mongodb PHP extension is now available on PECL. Release Highlights.
Read more >mongo - Go Packages
Package mongo provides a MongoDB Driver API for Go. Basic usage of the driver starts with creating a Client from a connection string....
Read more >mongodb | Yarn - Package Manager
... encryption: do not attempt to merge autoEncryption options (e27fdf9) ... for Db.connect removed as not compatible with autodetection of Mongo type ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If mongodb is abiding by good semver citizenship (which I think they will), the promise with minor and patch releases is that they do not break the interface…
I’ve added a pull request.
@huineng You’ll simply want to ensure
mongodb
is in your package.json dependencies.npm install mongodb
oryarn install mongodb