Bot fails to start: "Initializing node_modules, hold on..."

I’ve followed a tutorial on adding a bot created by DBM to a server to run 24/7. During this, I had no errors until I opened the logs and had “initializing node_modules, hold on…” message stare at me for about an hour.

Any help solving this issue would be greatly appreciated!

The project is named helpful-skelly-v-1.

Hey @GenerelSchwerz, welcome to the Glitch forum!

I’m sorry you were running into problems. It looks to me like perhaps you’re just not running your bot’s code. If you change this line to say

    "start": "node Helpful\ Skelly/bot.js"

then you’ll be telling Glitch that you want to start your bot.

Let us know how that goes!

Alright! That sounds promising. Thank you for such a quick response! @cori

One question though, would I insert said code into the files on my computer and update them to the site or just directly implant it into the site.

@cori, it seems that this error appears when that file is edited: “Check /app/package.json: it has syntax errors, install won’t proceed.”

It then proceeds to loop this error: “parse error: Invalid escape at line 10, column 43”

Any suggestions?

@cori Regarding the bot name, I edited /Helpful Skelly/bot.js to Helpful_Skelly/bot.js and let it run. I’m now being shown a module error instead.

module.js:550 
throw err;
^
Error: Cannot find module 'discord.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/Helpful_Skelly/bot.js:8:35)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
a few seconds ago

If I’m going down the wrong path, please let me know.


MOD EDIT: formatting

Managed to fix that as well by adding in the missing directories in package.json from Helpful Skelly/package.json.

I now have this issue: Please copy the “Actions” folder from the Discord Bot Maker directory to this bot’s directory:

8:26 PM

/app/actions

Despite having plenty of actions already listed there. The installation has been completed, just a minor issue before the bot is fixed.

I don’t want to tamper any more without any backups; this was already risky enough. :smiley:
I’d love to hear back with some more advice! @cori