#[Solved] Error Cannot find module ‘node events’

1 messages · Page 1 of 1 (latest)

barren cliff
#

Hi i'm getting this when i start my bot, i have Node 16.6.1

gray heath
#

you need to kill the pm2 process and start it again

barren cliff
gray heath
#

you're doing something wrong, its not a problem with discord.js

barren cliff
#

I even upgraded node.js (v16.11.0) like on my PC and same problem

gray heath
#

You probably didn't kill the pm2 daemon

gray heath
#

add a console.log(process.version) in your project and see what that logs

#

before importing discord.js

#

@barren cliff

gray heath
#

And you're still getting the node:events error?

barren cliff
#

yep

gray heath
#

As you can see in the history thing it was added in 16.0.0

barren cliff
#

okay, maybe I should upgrade it to the current version (v17.4.0)? I don't see why it wouldn't work otherwise.

#

well, I don't know why but in v17.4.0 it work
Thanks for helping me 😉