#Error Trying to Run on Server

10 messages · Page 1 of 1 (latest)

zinc hawk
#

Before when I was in VS code running it. It worked perfectly fine but when I move it to a server I get this error.

file:///home/container/source/index.js:1
import { Client, GatewayIntentBits, Collection } from 'discord.js'
                 ^^^^^^^^^^^^^^^^^
SyntaxError: The requested module 'discord.js' does not provide an export named 'GatewayIntentBits'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
tidal canyonBOT
quartz fox
#

did you upload your node_modules as well?

#

if yes, you're not supposed to do that

#

delete the folder and reinstall

zinc hawk
#

But I will delete them

#

And try again

#

That fixed it somehow

#

Thanks