Unhandled rejection Mongo Error: get addrinfo ENOTFOUND on running mocha test

Unhandled rejection Mongo Error: get addrinfo ENOTFOUND on running mocha test

当我运行 grunt 测试时,我遇到了这个错误:

Unhandled rejection MongoError: failed to connect to server[Mongo: 27017] on first connect[Mongo Error: getaddrinfo ENOTFOUND Mongo Mongo:27017] at 
at Pool.<anonymous> (/Users/michaelks/Desktop/users/node_modules/mongodb-core/lib/topologies/server.js:325:35)
    at emitOne (events.js:96:13)
    at Pool.emit (events.js:188:7)
    at Connection.<anonymous> (/Users/michaelks/Desktop/users/node_modules/mongodb-core/lib/connection/pool.js:270:12)
    at Connection.g (events.js:292:16)
    at emitTwo (events.js:106:13)
    at Connection.emit (events.js:191:7)
    at Socket.<anonymous> (/Users/michaelks/Desktop/users/node_modules/mongodb-core/lib/connection/connection.js:173:49)
    at Socket.g (events.js:292:16)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at connectErrorNT (net.js:1025:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

社区,请帮帮我...

找到了错误的根本原因,其实是因为程序在后台期望MongoDB到运行,但是找不到MongoDB 运行宁.