Closed jimango closed 3 years ago
Hi @jimango,
You'll find it easier to run npm run start
instead of trying to utilise node
, or use npm run dev:local
to run it behind nodemon. There have been some package updates, so make sure to install the latest dependencies with npm install
.
Cheers
I see. I did npm run start
.
But in the log I can see things like this:
[RUNNER]: [1619020776] "update-presence" was executed.
(node:3328591) UnhandledPromiseRejectionWarning: MongooseServerSelectionError: getaddrinfo EAI_AGAIN db
at NativeConnection.Connection.openUri (/***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/connection.js:845:32)
at /***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/index.js:348:10
at /***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise (<anonymous>)
at promiseOrCallback (/***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Mongoose._promiseOrCallback (/***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/index.js:1152:10)
at Mongoose.connect (/***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/index.js:347:20)
at module.exports (/***/***/DiscordBot/Safemoon-Bot/src/mongo.js:6:18)
at Object.run (/***/***/DiscordBot/Safemoon-Bot/src/jobs/pricewatch-single.js:20:11)
at Timeout._onTimeout (/***/***/DiscordBot/Safemoon-Bot/src/jobs.js:39:17)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3328591) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3328591) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Running command: price
(node:3328591) UnhandledPromiseRejectionWarning: MongooseError: Operation `setups.find()` buffering timed out after 10000ms
at Timeout.<anonymous> (/***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:20)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
(node:3328591) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3328591) UnhandledPromiseRejectionWarning: MongooseError: Operation `setups.find()` buffering timed out after 10000ms
at Timeout.<anonymous> **(/***/***/DiscordBot/Safemoon-Bot/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:20)**
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
(node:3328591) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
[RUNNER]: [1619020806] "update-presence" was executed.
Since there was a line telling me how to pin down the warning message I used that command node --trace-warnings to extract it.
If this log looks good to you I guess there is no issue. :) Im running this without Docker (btw).
EDIT: the icons of the bot are plain red and green colour, not the icon in chat reply from bot.. not sure if there is a connection there?
Hi @jimango,
If you're running without Docker, and have Mongo installed on the machine you're running the bot from, you'll probably want to change your config.json
to have mongoPath
set to: mongodb://localhost:27017/
which should suppress & fix the error you're seeing. I updated it so that it uses db
, which is the Docker container's name. I should probably update the README to highlight that!
Cheers
the icons of the bot are plain red and green colour, not the icon in chat reply from bot.. not sure if there is a connection there?
I didn't have enough time today to extract the emoji's from the guild they're in, I'll get around to that sometime this week or weekend.
Cheers.
Thank you very much!
Question:
What is this and how can I possible solve this?