gpt4 book ai didi

node.js - 连接失败在 Node 应用程序中连接mongodb

转载 作者:太空宇宙 更新时间:2023-11-04 01:14:39 24 4
gpt4 key购买 nike

我在使用 Node server.js 启动服务器时遇到错误。错误详细信息在这里:

path.existsSync is now called `fs.existsSync`.
info - socket.io started
[Thu, 02 Aug 2012 00:58:27 GMT] INFO Tower development server listening on port 3000
[Error: Target script does not exist: node_modules/design.io/bin/design.io]

/Users/Drew/test/desert-level-pets/node_modules/tower/lib/tower/server/store/mongodb/database.js:39
throw error;
^
Error: failed to connect to [127.0.0.1:27017]
at Server.connect.connectionPool.on.server._serverState (/Users/Drew/test/desert-level-pets/node_modules/mongodb/lib/mongodb/connection/server.js:473:73)
at EventEmitter.emit (events.js:115:20)
at connection.on._self._poolState (/Users/Drew/test/desert-level-pets/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:92:15)
at EventEmitter.emit (events.js:91:17)
at Socket.errorHandler (/Users/Drew/test/desert-level-pets/node_modules/mongodb/lib/mongodb/connection/connection.js:387:10)
at Socket.EventEmitter.emit (events.js:88:17)
at Socket._destroy.self.errorEmitted (net.js:329:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9

谁能帮我解决这个问题吗?谢谢,

最佳答案

您需要确保有一个 mongodb 实例已启动并正在运行。另外,您是否在尝试运行“塔服务器”的目录中运行“npm install”来安装 design.io 和塔需要的所有其他软件包?看起来这就是问题的一部分。

关于node.js - 连接失败在 Node 应用程序中连接mongodb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11772995/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com