#missing module error (npm)
36 messages · Page 1 of 1 (latest)
• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.
Update node.js not npm
^^^^^^^^^^^^^^^^^^^^
Google it or ask Replit Community
ok
i updated node and it still keeps throwing errors
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'node:events'
Require stack:
- /home/runner/Saturn-Bot-2/node_modules/discord.js/src/client/BaseClient.js
- /home/runner/Saturn-Bot-2/node_modules/discord.js/src/index.js
- /home/runner/Saturn-Bot-2/node_modules/discord-buttons/src/index.js
- /home/runner/Saturn-Bot-2/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/home/runner/Saturn-Bot-2/node_modules/discord.js/src/client/BaseClient.js:3:22)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/home/runner/Saturn-Bot-2/node_modules/discord.js/src/index.js:6:22)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/Saturn-Bot-2/node_modules/discord.js/src/client/BaseClient.js',
'/home/runner/Saturn-Bot-2/node_modules/discord.js/src/index.js',
'/home/runner/Saturn-Bot-2/node_modules/discord-buttons/src/index.js',
'/home/runner/Saturn-Bot-2/index.js'
]
}
exit status 1
do u know why that error is happening
?
djs requires node v16.9 or higher
lower than 16.9
• What's your exact discord.js npm list discord.js and node node -v version?
ok
lemme look
it worked perfectly fine yesterday
im on v14
so lemme update
16.18.0 good?
18 is greater than 9
then you are still using an old version of node. you can log process.version at the top of your main entry file