nodejs 连接mongoose 报错 connect ECONNREFUSED怎么解决呢?
发布于 7小时前 作者 jaywcjlove 20 次浏览 来自 问答

https://github.com/jaywcjlove/nxylene

一般情况本地调试不报错,在使用coding.net 中的演示功能,连接mongodb的时候就报下面的错误,无法运行。

/home/vcap/app/node_modules/connect-mongo/node_modules/mongodb/lib/server.js:228
        process.nextTick(function() { throw err; })
                                            ^
Error: connect ECONNREFUSED
    at exports._errnoException (util.js:746:11)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
npm ERR! Linux 3.2.0-67-virtual
npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node ./app.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node ./app.js'.
npm ERR! This is most likely a problem with the nodetest package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./app.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls nodetest
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/vcap/app/npm-debug.log
回到顶部