Skip to content
Sign upLog in
← Back to Community

discord.js bot not running

Profile icon
orangegrouptech

Hey repl.it,
I have just migrated to repl.it from Glitch and I uploaded my files to my repo. However, when I click the run button, everything on the console disappears for a second before reappearing, but the bot doesn't run and the stop button becomes the run button again, which shows that it stopped running. When I try to start it manually with node bot.js it says that bot.js is an unexpected identifier. When I try to install all the npms using npm i, it says "npm should be run outside of the node repl, in your normal shell.
(Press Control-D to exit.)"
Please help! Thanks.

Voters
Profile icon
Memop8
Profile icon
orangegrouptech
Comments
hotnewtop
Profile icon
TheForArkLD

try use 11.5.1

Profile icon
orangegrouptech

@TheForArkLD
I'm coding in discord.js 12 and it requires node.js ^12

Profile icon
TheForArkLD

@orangegrouptech
.-.
ok

  1. go package.json
  2. change discord.js version to 11.5.1
  3. run
Profile icon
orangegrouptech

@TheForArkLD
nvm I solved it by using a .replit file
anyway if i change it to 11.5.1 it would be incompatible as i wrote the entire bot in discord.js 12

Profile icon
TheForArkLD

@orangegrouptech
oh.
then you can't solve problem...