cannot find node:event module
See original GitHub issueWhich package is this bug report for?
discord.js
Issue description
- just “const { EmbedBuilder, WebhookClient } = require( “discord.js” );” this code
Error: Cannot find module ‘node:events’ at require (internal/modules/cjs/helpers.js:22:7) at Anonymous function (D:\project\node_modules\discord.js\src\client\BaseClient.js:3:1) at require (internal/modules/cjs/helpers.js:22:7) at Anonymous function (D:\project\node_modules\discord.js\src\index.js:6:1)
Code sample
const { EmbedBuilder, WebhookClient } = require( "discord.js" );
Package version
14.6.0
Node.js version
18.12.1
Operating system
windows 10
Priority this issue should have
High (immediate attention needed)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
No response
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Error when requiring discordjs: "cannot find module 'node ...
The required Node.js version for discord.js is v16.6. Without it you could get ... Unexpected token '?'; Cannot find module 'node:events'.
Read more >Error: Cannot find module 'node:events' - Code Help - Discord
I am getting an error pretty annoying after with pnpm enabled. _ internal/modules/cjs/loader.js:613 throw err; ^ Error: Cannot find module 'node:events'
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >Error: Cannot find module 'node:events' - Reddit
I'm new to node and when I tried searching this error, it appeared in stackoverflow only 5 days ... Error: Cannot find module...
Read more >Error TS2307: Cannot find module events - TypeScript TV
Extending the EventEmitter class from Node.js might cause error TS2307. Here is how to fix it.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No It’s a bug. Did u see my node version?
High chance that is not the node version used in your bots process. Try
console.log(process.version)
before importing discord.js