The serverk lines
Every line that starts with serverk: comes from us, not from your bot, and shows what we did before it started:
deploying ...: a new deployment began.fetching ... at ...orunpacking snapshot ...: we pull the commit from your repository, or unpack the version you uploaded.installing dependencies ...: we install the dependencies.dependencies are up to date: nothing changed, so we didn't reinstall.deployment ... ready at ...: the deployment succeeded.web address ... on port ...: your bot's web address and the port it must listen on, while the web address is on.port 1 ...andport 2 ...: the number of each port that's on, with the address others connect to while the web address is on.start command: ...: the command we run your bot with.bot process starting: your bot started, and every line after it is printed by your bot itself.
When your bot crashes
Errors show up in red. Read the first red line, not the last one:
TypeError: Cannot read properties of undefined (reading 'send')
at Client.<anonymous> (/home/container/index.js:12:18)The first line says what went wrong, and the next one says where: the file index.js, line 12.
The usual errors
deployment ... failed: sync: ...: we couldn't pull the commit. Check that the repository and the branch exist and that the Serverk app on GitHub can reach the repository.deployment ... failed: sync: repository tracks .serverk: your repository has a.serverkfolder, and that name is reserved for Serverk. Delete the folder from your repository and redeploy.deployment ... failed: install: ...: the dependency install failed and the line says why. Usuallypackage-lock.jsondoesn't matchpackage.json, so runnpm installon your computer and push the new lockfile.deployment ... failed: start: nothing to start: we found no way to start your bot. Add astartscript topackage.json, or set a start command in your bot's settings.TokenInvalidor401 Unauthorized: the token is wrong or changed. Check the variable's name and value, then redeploy.Used disallowed intents: turn on the intent your bot asks for on the Bot page of the Developer Portal.JavaScript heap out of memory: your bot ran out of RAM. Move to a bigger plan or keep less in memory.
Did this guide help you?
Improve this guide
Guides are open source. Found a fix or an addition? Open a pull request on github.com/serverkgg/bot-node