2

我有 nodejs 与 mongodb 数据库一起运行,我正在尝试安装 javascript 驱动程序 mongodb-native .. 当我尝试“npm install -g mongodb --mongodb:native”时

我尝试在 Windows 7 机器上安装相同的配置,它工作得很好。知道为什么它不适用于 Windows server 2008 吗?

这是我从 npm install 命令得到的输出:

npm http GET https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/bson/0.1.5
npm http GET https://registry.npmjs.org/bson/0.1.5
npm http GET https://registry.npmjs.org/bson/0.1.5

> bson@0.1.5 install C:\Users\xxx\AppData\Roaming\npm\node_modules\mongodb\no
de_modules\bson
> node install.js || (exit 0)

================================================================================

=                                                                              =

=  Attempting to build bson c++ extension                                      =

=   Windows: no build will be attempted as binaries are prepackaged            =

=   Unix: on failure the package will still install without the C++ extension  =

=                                                                              =

================================================================================

mongodb@1.1.11 C:\Users\xxx\AppData\Roaming\npm\node_modules\mongodb
└── bson@0.1.5

C:\Users\xxx>npm ls
C:\Users\xxx
└── (empty)
4

1 回答 1

0

我可以确认该驱动程序仅在 Windows 7 上测试过,而不是 W2K8,因此它无法正常工作也就不足为奇了。

如果您可以将调试信息上传到Node MongoDB Google Group以进行进一步分析和测试,我们将不胜感激。可以在那里更好地跟踪问题。

于 2012-10-22T08:59:33.513 回答