尝试连接到Mongodb时Cube.js引发错误

时间:2019-07-11 20:51:49

标签: node.js mongodb

我正在尝试使用cube.js和MongoDb构建仪表板,但是我正在尝试访问架构出错

Error: connect ETIMEDOUT at Connection._handleTimeoutError (/Users/test/mongo-tutorial/node_modules/mysql2/lib/connection.js:171:17) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10```

Does anyone know what is causing this error?

1 个答案:

答案 0 :(得分:0)

在大多数情况下,这意味着设置了错误的CUBEJS_DB_HOST和/或CUBEJS_DB_PORT env变量。