Skip to content
Advertisement

TypeError: path.join is not a function (got the error in my handleEvents.js file)

I am trying to make a discord bot and i got this error in my handleEvents.js file

The code:

JavaScript

Advertisement

Answer

You are missing a path module import

JavaScript

and by using the name path as property of your callback, you would be overwriting the path module.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement