【问题标题】:Update MongoDB Driver for WebStorm plugin为 WebStorm 插件更新 MongoDB 驱动程序
【发布时间】:2017-02-10 18:53:28
【问题描述】:

我正在尝试在 OSX 上的 WebStorm 中使用“Mongo 插件”。我的数据库中的两个集合在 IDE 中成功列出,但是当我尝试打开其他集合时,我收到错误消息,例如:

org.bson.BsonSerializationException:检测到字段名“myfield”的未知 BSON 类型“\x13”。您使用的是最新的驱动程序版本吗?

产生这个错误信息的字段是 BigDecimal 类型,比较新。我已经确认我的 mongo shell 的路径在 /usr/local/bin/mongo 的插件中是正确的。

我应该如何更新驱动程序?我已经研究过这个问题并且知道MongoDB drivers 的位置,但我不知道要为插件更新哪个(或如何)。

另外,我通过homebrewnpm 验证了Mongo 的任何版本都已更新。这些可能不相关。

NPM -g:

npm install -g mongodb
/usr/local/lib
└─┬ mongodb@2.2.22
  ├── es6-promise@3.2.1
  ├─┬ mongodb-core@2.1.7
  │ ├── bson@1.0.4
  │ └─┬ require_optional@1.0.0
  │   ├── resolve-from@2.0.0
  │   └── semver@5.3.0
  └─┬ readable-stream@2.1.5
    ├── buffer-shims@1.0.0
    ├── core-util-is@1.0.2
    ├── inherits@2.0.3
    ├── isarray@1.0.0
    ├── process-nextick-args@1.0.7
    ├── string_decoder@0.10.31
    └── util-deprecate@1.0.2

酿造:

brew install mongo
Warning: mongodb-3.4.2 already installed

还有目标服务器上的Mongo版本:

mongo --version
MongoDB shell version v3.4.1
git version: 5e103c4f5583e2566a45d740225dc250baacfbd7
OpenSSL version: OpenSSL 1.0.1t  3 May 2016
allocator: tcmalloc
modules: none
build environment:
    distmod: debian71
    distarch: x86_64
    target_arch: x86_64

【问题讨论】:

标签: mongodb macos driver homebrew webstorm


【解决方案1】:

感谢 LazyOne 提供的链接,我发现该插件在此日期之前根本不通过 this issue 提供对 Decimal 类型的支持。

【讨论】:

    猜你喜欢
    • 2014-11-16
    • 1970-01-01
    • 1970-01-01
    • 2016-03-13
    • 2017-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多