mekb-turtle / discord-ai-bot

Discord AI chatbot using Ollama
https://github.com/jmorganca/ollama
213 stars 54 forks source link

it never starts #24

Closed DJkitty2 closed 1 month ago

DJkitty2 commented 1 month ago

Lifecycle scripts included in discord-ai-bot: start node src/index.js PS C:\Users\DJkitty\Desktop\ai>

I followed https://www.youtube.com/watch?v=-ikvkV1H9LA&ab_channel=PracticalAIthroughPrototypes

mekb-turtle commented 1 month ago

Hi, what command are you using to start the bot? If you haven't already, please run npm i to install the required dependencies.

KG-khangelani commented 1 month ago

This is what I get after setting everything up:

E:\Dummy Repos\discord-ai-bot git:[main]
npm start

> start
> node src/index.js

[Shard Manager] [INFO] Loading
E:\Dummy Repos\discord-ai-bot\node_modules\undici\lib\web\fetch\index.js:2034
        fetchParams.controller.controller.error(new TypeError('terminated', {
                                                ^

TypeError: terminated
    at Fetch.onAborted (E:\Dummy Repos\discord-ai-bot\node_modules\undici\lib\web\fetch\index.js:2034:49)
    at Fetch.emit (node:events:513:28)
    at Fetch.terminate (E:\Dummy Repos\discord-ai-bot\node_modules\undici\lib\web\fetch\index.js:93:10)
    at E:\Dummy Repos\discord-ai-bot\node_modules\undici\lib\web\fetch\index.js:506:30
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  [cause]: TypeError [ERR_INVALID_ARG_TYPE]: The "stream" argument must be an instance of Stream. Received an instance of ReadableStream
      at new NodeError (node:internal/errors:393:5)
      at eos (node:internal/streams/end-of-stream:65:11)
      at fetchFinale (E:\Dummy Repos\discord-ai-bot\node_modules\undici\lib\web\fetch\index.js:1093:5)
      at mainFetch (E:\Dummy Repos\discord-ai-bot\node_modules\undici\lib\web\fetch\index.js:760:5)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    code: 'ERR_INVALID_ARG_TYPE'
  }
}

Node.js v18.12.1
DJkitty2 commented 1 month ago

I figured it out I reset and then ran the code and it worked

mekb-turtle commented 1 month ago

looking at the error, this didn't seem to be an issue with the bot, perhaps discord.js or another library, but glad you managed to fix it

KG-khangelani commented 1 month ago

I figured it out I reset and then ran the code and it worked

What do you mean by 'reset'?