#Cannot find module @discordjs

5 messages · Page 1 of 1 (latest)

mighty abyss
#

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'
}

I download theses module :

  • @discordjs/voice
  • prism-media
  • @discordjs/opus
  • libsodium-wrappers
lethal anchorBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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
rich plaza
#

Looks like you didn’t install @discordjs/voice correctly. Did you use npm, pnpm or yarn?

mighty abyss
#

I used NPM

#

I just removed it and reinstalled it