Closed windmemory closed 5 years ago
It isn't "@types/mongodb": "^3.1.17"
in package.json
?
^
means to install the latest version under the major version. For more details please check instruction of npm semver and package.json file.
I agree with you, it should use the latest version of @types/mongodb
, but it doesn't in my repository. I don't know the exact reason, and my workaround fix is install it myself.
I filed an issue here just want to record what I encountered and how I solved my problem.
I do like this plugin more than the egg-mongoose
, so try to provide some useful info here.
:)
Then what exact version has been installed in your repo?
with only this package egg-mongo-native
installed, I got 3.1.17
I will see if I can reproduce it.
I found a bug that for @types/mongodb
v0.3.17
that theCondition
type has a required field$where
, which doesn't make any sense.I was trying to do a
$pull
operation on mongodb, but it asks me to add a$where
clause inside the$pull
, otherwise the ts will throw error and not compiling the code.And this bug is fixed in
v0.3.19
, so please update it :)