appujet / lavamusic

lavalink music bot base in lavalink-client and discord.js v14
https://appujet.github.io/lavamusic/
GNU General Public License v3.0
574 stars 490 forks source link

Repl.it #127

Closed AJais980 closed 2 years ago

AJais980 commented 2 years ago

When trying to run the script on repl.it through the link given, it doesn't work and shows this error..


 node src/index.js
internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module 'node:events'
Require stack:
- /home/runner/lavamusic/node_modules/discord.js/src/client/BaseClient.js
- /home/runner/lavamusic/node_modules/discord.js/src/index.js
- /home/runner/lavamusic/src/structures/MusicClient.js
- /home/runner/lavamusic/src/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/lavamusic/node_modules/discord.js/src/client/BaseClient.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/lavamusic/node_modules/discord.js/src/client/BaseClient.js',
    '/home/runner/lavamusic/node_modules/discord.js/src/index.js',
    '/home/runner/lavamusic/src/structures/MusicClient.js',
    '/home/runner/lavamusic/src/index.js'
  ]
}
oyejateen commented 2 years ago

Hey there,

This is a very comman error while using replit for self hosting the Lavalink. You should update your node version to 16 or above For updating the node version

  1. Open the project
  2. Tap on the shell besides the console on the right side of the screen.
  3. Type

npm i -D node@16.5.0

And tap enter!!

It will download the node@16.5 and that's it.

For more help feel free to dm at ❀SUNSHİNE❀#1359