.../node_modules/mongoose/node_modules/mongodb/lib/server.js:235
process.nextTick(function() { throw err; })
^
Error: connect ETIMEDOUT
at exports._errnoException (util.js:746:11)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
To put it simply, it means that it cannot be connected, and there are generally two situations.
The connected MongoDB is local
Then you need to check whether your connection string is written correctly and whether the default port number has been changed.
The connected MongoDB is on another server
First check whether the two servers can communicate normally, and then refer to the first point
I think at least we need to make sure the above is correct.