Cannot find module @discordjs

Hey ! I want to play around with the voice library but I have this error
node:internal/modules/cjs/loader:599
throw e;
^

Error: Cannot find module 'D:\Programming\javascript\lang-learner\node_modules\@discordjs\voice\dist\index.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1182:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1170:15)
at resolveExports (node:internal/modules/cjs/loader:592:14)
at Module._findPath (node:internal/modules/cjs/loader:669:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Module.require (node:internal/modules/cjs/loader:1233:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (D:\Programming\javascript\lang-learner\helpers\voice-helper.js:3:30)
at Module._compile (node:internal/modules/cjs/loader:1358:14) {
code: 'MODULE_NOT_FOUND',
path: 'D:\\Programming\\javascript\\lang-learner\\node_modules\\@discordjs\\voice\\package.json'
}
node:internal/modules/cjs/loader:599
throw e;
^

Error: Cannot find module 'D:\Programming\javascript\lang-learner\node_modules\@discordjs\voice\dist\index.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1182:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1170:15)
at resolveExports (node:internal/modules/cjs/loader:592:14)
at Module._findPath (node:internal/modules/cjs/loader:669:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Module.require (node:internal/modules/cjs/loader:1233:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (D:\Programming\javascript\lang-learner\helpers\voice-helper.js:3:30)
at Module._compile (node:internal/modules/cjs/loader:1358:14) {
code: 'MODULE_NOT_FOUND',
path: 'D:\\Programming\\javascript\\lang-learner\\node_modules\\@discordjs\\voice\\package.json'
}
I download theses module : - @discordjs/voice - prism-media - @discordjs/opus - libsodium-wrappers
2 Replies
d.js toolkit
d.js toolkit6mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
TATHAN
TATHANOP6mo ago
I used NPM I just removed it and reinstalled it and it worked!
Want results from more Discord servers?
Add your server