var settings = require(‘…/settings’), Db = require(‘mongodb’).Db, Connection = require(‘mongodb’).Connection, Server = require(‘mongodb’).Server;
module.exports = new Db(settings.db,new Server(settings.host, Connection.DEFAULT_PORT),{});
Connection.DEFAULT_PORT 编辑器显示没有这个对象,mongodb API升级了么?
C:\Users\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node rebuild ) gyp ERR! configure error
为什么?