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

Bot not starting; SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON #537

Closed etwasmitbaum closed 6 months ago

etwasmitbaum commented 6 months ago

I did clone the repository with version 4.10, followed the the setup steps (with Prisma) from the readme. Unfortunately I get following error which is spamming the console.

> lavamusic@4.1.0 start
> npm run build && node dist/index.js

> lavamusic@4.1.0 build
> tsc --project tsconfig.json

    █░░ ▄▀█ █░█ ▄▀█ █▀▄▀█ █░█ █▀ █ █▀▀
    █▄▄ █▀█ ▀▄▀ █▀█ █░▀░█ █▄█ ▄█ █ █▄▄

             .:::.=++=:.:-:
            =##############*
            *###############.
             =++=*####*=++=:
                 .*##*:
               .+######*:
              =*#########+.
            :*############*-
           =################*.
         :*##################*=
       .+######################*:
       *#########################.
       .::::::::::::::::::::::::.

[4/15/2024] [6:47:26 PM] [index.js] [Lavamusic] › ▶  start     [CLIENT] 1 shard(s) spawned.
undefined:1
<!DOCTYPE html>
^

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)
    at successSteps (node:internal/deps/undici/undici:5555:27)
    at fullyReadBody (node:internal/deps/undici/undici:1665:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)
    at async Lavamusic.getNodes (file:///home/musicbot/lavamusic/dist/structures/Lavamusic.js:123:23)
    at async Lavamusic.start (file:///home/musicbot/lavamusic/dist/structures/Lavamusic.js:31:27)

Node.js v20.12.1
AeCyrexus commented 6 months ago

try setting AUTO_NODE to false on your .env file

etwasmitbaum commented 6 months ago

@AeCyrexus Thank you, this did not directly fix my issue but pointed me in the right direction. I had Syntax errors and missing variables in my .env file.