SudhanPlayz / Discord-MusicBot

An advanced discord music bot, supports Spotify, Soundcloud, YouTube with Shuffling, Volume Control and Web Dashboard with Slash Commands support!
https://musicbot.darrenofficial.com
Other
2.99k stars 2.9k forks source link

npm install & node index.js is error... #932

Closed Hiura-Souji closed 2 years ago

Hiura-Souji commented 2 years ago

npm install & node index.js is error...

Include a reproducible code sample here, if possible:


D:\_dc_bot\Music\Discord-MusicBot\v5_Aruma>npm install

> discord-musicbot@5.0.0-beta postinstall
> cd dashboard && curl --compressed -o- -L https://yarnpkg.com/install.sh | bash && yarn

'bash' Not an internal or external command, executable program or batch file.
npm ERR! code 255
npm ERR! path D:\_dc_bot\Music\Discord-MusicBot\v5_Aruma
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c cd dashboard && curl --compressed -o- -L https://yarnpkg.com/install.sh | bash && yarn

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2022-06-22T05_24_55_346Z-debug-0.log

D:\_dc_bot\Music\Discord-MusicBot\v5_Aruma>node index.js
Make sure to fill in the config.js before starting the bot.
[22:5:2022 - 13:25] | Started the bot...
D:\_dc_bot\Music\Discord-MusicBot\v5_Aruma\lib\DiscordMusicBot.js:50
        throw Error(err);
              ^

Error: TypeError: Cannot read properties of undefined (reading 'startsWith')
    at D:\_dc_bot\Music\Discord-MusicBot\v5_Aruma\lib\DiscordMusicBot.js:50:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.4.0

Further details:

Relevant client options:

JotaroKujo0525 commented 2 years ago

First, bash doesn't work in windows, so remove the postinstall array in package.json. Second,this could've been a package fault, so try deleting node_modules

tldr: Remove postinstall array on package.json, then npm i again. And now node index.js

JotaroKujo0525 commented 2 years ago

This isn't a bug, but just a fault in code. If this solves your issue, you can now close this issue

SudhanPlayz commented 2 years ago

fixed

JotaroKujo0525 commented 2 years ago

h

Hiura-Souji commented 2 years ago

hello thank you for your help now the msg is show:

`D:_dc_bot\Music\Discord-MusicBot\v5_Aruma>node index.js Make sure to fill in the config.js before starting the bot. [22:5:2022 - 15:15] | Started the bot... D:_dc_bot\Music\Discord-MusicBot\v5_Aruma\lib\DiscordMusicBot.js:50 throw Error(err); ^

Error: TypeError: Cannot read properties of undefined (reading 'startsWith') at D:_dc_bot\Music\Discord-MusicBot\v5_Aruma\lib\DiscordMusicBot.js:50:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.4.0`

JotaroKujo0525 commented 2 years ago

Remove node_modules, then npm i again. And now node index.js

JotaroKujo0525 commented 2 years ago

Must've been your failed installation earlier

Hiura-Souji commented 2 years ago

i am so sorry it is config have a new val and i use old ver config......

it is can run now. thank you~