Giter VIP home page Giter VIP logo

Comments (33)

PhiJoTo avatar PhiJoTo commented on July 17, 2024

1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 info lifecycle [email protected]~start: [email protected] 7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/TTSBot/discord-tts-bot/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/> 9 verbose lifecycle [email protected]~start: CWD: /home/ubuntu/TTSBot/discord-tts-bot 10 silly lifecycle [email protected]~start: Args: [ '-c', 'node ./src/app.js' ] 11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 12 info lifecycle [email protected]~start: Failed to exec start script 13 verbose stack Error: [email protected] start: node ./src/app.js13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid [email protected] 15 verbose cwd /home/ubuntu/TTSBot/discord-tts-bot/config 16 verbose Linux 5.4.0-1011-raspi 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start" 18 verbose node v10.19.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] start:node ./src/app.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

`

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Hey there, this may sound like a dumb question but did you run npm install or yarn install before trying to start the bot?

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

I installed npm but I didn't install yarn, sorry.. I will try it, I'm kinda new to Linux..

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

It still isn't working..
0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 info lifecycle [email protected]~start: [email protected] 7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/TTSBot/discord-tts-bot/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/> 9 verbose lifecycle [email protected]~start: CWD: /home/ubuntu/TTSBot/discord-tts-bot 10 silly lifecycle [email protected]~start: Args: [ '-c', 'node ./src/app.js' ] 11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 12 info lifecycle [email protected]~start: Failed to exec start script 13 verbose stack Error: [email protected] start: node ./src/app.js13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid [email protected] 15 verbose cwd /home/ubuntu/TTSBot/discord-tts-bot 16 verbose Linux 5.4.0-1011-raspi 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start" 18 verbose node v10.19.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] start:node ./src/app.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

`

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Oh no, you may have misunderstood me, you don't need yarn. What I meant is that you should run npm install before npm start in the same folder where the bot is located.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

I did both now but without success...

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Do you get any error messages after running npm install?

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

nope.. it says "audited 41 packages in 1.928s
found 0 vulnerabilities"

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

I see, I tried installing the bot in my computer and I got the same error. It seems that discord.js changed the way to install the version 12 of their library, which the bot currently uses.
I could do the fix later today but if you feel in a bit of a rush, you can do the following:

  1. Open the package.json file and remove the line that says: "discord.js": "github:discordjs/discord.js",.
  2. In your terminal, in the same directory as the file package.json, run the following commands:
rm -rf node-modules/
npm install
npm install discord.js

Finally, it should work. But like I said, I will make this change later tonight, so that the rest aren't forced to go through this. Please do tell me if after doing this the bot is running fine so I can close this issue.

Thanks for your report!

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

On the last command I get following error:
`ubuntu@ubuntu:~/TTSBot/discord-tts-bot$ npm install discord.js
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=12.0.0"} (current: {"node":"10.19.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]

  • [email protected]
    updated 1 package and audited 41 packages in 2.858s
    found 0 vulnerabilities

`

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

As of right now, discord.js only supports node version 12 or higher and your current node version is 10 so you need to update it.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

I really don't want to bother you but even after installing version 14 it isn't working.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

Error: Cannot find module '../config/settings.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/ubuntu/TTSBot/discord-tts-bot/src/app.js:4:51)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./src/app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2020-06-07T18_42_03_583Z-debug.log

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

I really don't want to bother you but even after installing version 14 it isn't working.

Don't worry man you're not bothering me, you're rather helping me improve this bot, which I'm grateful for.

As for the error you just posted right now, that shows that it's working but that you haven't followed the installation notes.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

I am really sorry.. I forget renaming the config file.. But the error is still the same..

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

If you're getting the same error as the one your previously mentioned then it means that the filename is still incorrect or that the file is in the wrong folder.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

Anmerkung 2020-06-07 205725
Anmerkung 2020-06-07 205751

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

And you're still getting the module not found settings.json error when doing npm start?

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

Yes..
Anmerkung 2020-06-07 210216

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

I see, the error is not the same but it still related to the update that there was with discord.js. I'm gonna work on it tonight, in tue meantime I invite you to use the version of the bot that I'm hosting until I fix it so that you can use your own self-hosted version.

Thanks for your report and I'm sorry for all the inconveniences this may have caused you.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

Okay, really thank you.. I am gonna wait till tonight..

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Hey there, I updated the code to work with the newest stable version of discord.js. I tested it on my local machine and it works with node versions 12.0.0 and 14.4.0.

Moreover, the last error that you were getting was due because you were running a node version older than the 12.0.0. Maybe you needed to restart your ssh connection?

In any case, if you update your bot by redownloading the zip with the code or by running git pull origin master, you should have the new changes. Make sure you remove again the node-modules folder and re-run npm install and npm run with the proper node version.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

I completely reinstalled everything and this is the error I'm still getting.
`

[email protected] start /home/ubuntu/discord-tts-bot
node ./src/app.js

/home/ubuntu/discord-tts-bot/node_modules/discord.js/src/structures/MessageEmbed.js:443
.flat(2)
^

TypeError: fields.flat is not a function
at Function.normalizeFields (/home/ubuntu/discord-tts-bot/node_modules/discord.js/src/structures/MessageEmbed.js:443:8)
at MessageEmbed.addFields (/home/ubuntu/discord-tts-bot/node_modules/discord.js/src/structures/MessageEmbed.js:259:42)
at MessageEmbed.addField (/home/ubuntu/discord-tts-bot/node_modules/discord.js/src/structures/MessageEmbed.js:250:17)
at Object. (/home/ubuntu/discord-tts-bot/src/common/langsEmbed.js:13:4)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./src/app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2020-06-07T23_55_53_767Z-debug.log
`

If it has to do with node, how do I switch versions?

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

That error is due to the outdated node version. If you run node -v what do you get?

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

v10.19.0

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

I figured it out.. Again, thanks for helping :)

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

One last question: How can I run the Bot, so that he stays online when I close putty?

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

I solved this using forever.. The Bot is in my channel now but it isn't saying anything..
https://discord.gg/vSUKgWr - This is my discord server. The prefix is "!"..

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

I solved this using forever.. The Bot is in my channel now but it isn't saying anything..

https://discord.gg/vSUKgWr - This is my discord server. The prefix is "!"..

Check the console output of your bot, maybe there's a clue there as to what's going on. Some things you should look out for:

  1. Does the bot have permissions to talk on your voice channel?
  2. Do you have ffmpeg installed on the computer running the bot?

But again, it's hard for me to help you right now without any console messages.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

`(3:31:15 PM) - [ERROR] - Error: Error: Cannot find module '/home/ubuntu/discord- tts-bot/node_modules/@discordjs/opus/prebuild/node-v83-napi-v3-linux-arm64-glibc -2.31/opus.node'
Require stack:

  • /home/ubuntu/discord-tts-bot/node_modules/@discordjs/opus/lib/index.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/util/loader.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/opus/Opus.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/opus/index.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/index.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/player/B asePlayer.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/player/B roadcastAudioPlayer.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/VoiceBro adcast.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/ClientVo iceManager.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/Client.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/index.js
  • /home/ubuntu/discord-tts-bot/src/app.js
    Error: Cannot find module 'node-opus'
    Require stack:
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/util/loader.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/opus/Opus.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/opus/index.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/index.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/player/B asePlayer.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/player/B roadcastAudioPlayer.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/VoiceBro adcast.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/ClientVo iceManager.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/Client.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/index.js
  • /home/ubuntu/discord-tts-bot/src/app.js
    Error: Cannot find module 'opusscript'
    Require stack:
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/util/loader.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/opus/Opus.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/opus/index.js
  • /home/ubuntu/discord-tts-bot/node_modules/prism-media/src/index.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/player/B asePlayer.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/player/B roadcastAudioPlayer.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/VoiceBro adcast.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/voice/ClientVo iceManager.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/client/Client.js
  • /home/ubuntu/discord-tts-bot/node_modules/discord.js/src/index.js
  • /home/ubuntu/discord-tts-bot/src/app.js
    at Object.loader [as require] (/home/ubuntu/discord-tts-bot/node_modules/pri sm-media/src/util/loader.js:12:9)
    at loadOpus (/home/ubuntu/discord-tts-bot/node_modules/prism-media/src/opus/ Opus.js:17:17)
    at new OpusStream (/home/ubuntu/discord-tts-bot/node_modules/prism-media/src /opus/Opus.js:46:10)
    at new Encoder (/home/ubuntu/discord-tts-bot/node_modules/prism-media/src/op us/Opus.js:135:5)
    at AudioPlayer.playPCMStream (/home/ubuntu/discord-tts-bot/node_modules/disc ord.js/src/client/voice/player/BasePlayer.js:58:34)
    at AudioPlayer.playUnknown (/home/ubuntu/discord-tts-bot/node_modules/discor d.js/src/client/voice/player/BasePlayer.js:53:17)
    at VoiceConnection.play (/home/ubuntu/discord-tts-bot/node_modules/discord.j s/src/client/voice/util/PlayInterface.js:71:28)
    at /home/ubuntu/discord-tts-bot/src/classes/TTSPlayer.js:80:45
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    `
    Anmerkung 2020-06-08 172455

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Hmm this is kinda weird. I tested the changes on two different machines with multiple node versions (macOS and Ubuntu Server) and they both work. Your error is displaying that node-opus cannot be found which is required to use voice channels for the bot. My bet would be that your machine may have had some issues compiling the opus bindings when doing npm install?

Maybe your computer doesn't have a C compiler installed?

Try running sudo apt-get install build-essential and then try removing node-modules and re running npm install.

from discord-tts-bot.

PhiJoTo avatar PhiJoTo commented on July 17, 2024

Finally, it works. Thanks for the massive help, I wouldn't have figured it out by myself by any chance :)

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

I'm glad it works now for you, you've been an immense help to realize that there were some changes that needed to be implemented since the latest discord-js update which I was unaware of.

I'll go ahead and close this issue, if anything else comes up, feel free to open a new one and I'll do my best to assist you!

from discord-tts-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.