discord-tickets / bot

The most popular open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
https://discordtickets.app
GNU General Public License v3.0
899 stars 473 forks source link

[BUG] NOT STARTING #553

Open djdiaguuu123 opened 1 month ago

djdiaguuu123 commented 1 month ago

Is there an existing issue for this?

Current Behavior

console

npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/container/node_modules/abstract-logging
npm ERR! dest /home/container/node_modules/.abstract-logging-r8vZIw6I
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/container/node_modules/abstract-logging' -> '/home/container/node_modules/.abstract-logging-r8vZIw6I'

npm ERR! A complete log of this run can be found in: /home/container/.npm/_logs/2024-08-10T13_01_18_642Z-debug-0.log
########  ####  ######   ######   #######  ########  ########  
##     ##  ##  ##    ## ##    ## ##     ## ##     ## ##     ## 
##     ##  ##  ##       ##       ##     ## ##     ## ##     ## 
##     ##  ##   ######  ##       ##     ## ########  ##     ## 
##     ##  ##        ## ##       ##     ## ##   ##   ##     ## 
##     ##  ##  ##    ## ##    ## ##     ## ##    ##  ##     ## 
########  ####  ######   ######   #######  ##     ## ########  
######## ####  ######  ##    ## ######## ########  ######  
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##     ##  ##       ##  ##   ##          ##    ##       
   ##     ##  ##       #####    ######      ##     ######  
   ##     ##  ##       ##  ##   ##          ##          ## 
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##    ####  ######  ##    ## ########    ##     ######  
Discord Tickets (​https://discordtickets.app​) bot v4.0.19 by eartharoid
Sponsor this project at https://discordtickets.app/sponsor
node:internal/modules/cjs/loader:1080
  throw err;
  ^
Error: Cannot find module '.prisma/client/index'
Require stack:
- /home/container/node_modules/@prisma/client/index.js
- /home/container/src/client.js
- /home/container/src/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/container/node_modules/@prisma/client/index.js:2:6)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/container/node_modules/@prisma/client/index.js',
    '/home/container/src/client.js',
    '/home/container/src/index.js'
  ]
}
Node.js v18.17.0
container@daki~ Server marked as offline...
[Daki Daemon]: ---------- Detected server process in a crashed state! ----------
[Daki Daemon]: Exit code: 1
[Daki Daemon]: Out of memory: false
[Daki Daemon]: Checking server disk space usage, this could take a few seconds...
[Daki Daemon]: Updating process configuration files...
[Daki Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
container@daki~ Server marked as starting...
[Daki Daemon]: Pulling Docker container image, this could take a few minutes to complete...
[Daki Daemon]: Finished pulling Docker container image
:/home/container$ /start.sh
container@daki~ Server marked as running...
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/container/node_modules/JSONStream
npm ERR! dest /home/container/node_modules/.JSONStream-nRWwNyhN
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/container/node_modules/JSONStream' -> '/home/container/node_modules/.JSONStream-nRWwNyhN'

npm ERR! A complete log of this run can be found in: /home/container/.npm/_logs/2024-08-10T13_02_39_171Z-debug-0.log
########  ####  ######   ######   #######  ########  ########  
##     ##  ##  ##    ## ##    ## ##     ## ##     ## ##     ## 
##     ##  ##  ##       ##       ##     ## ##     ## ##     ## 
##     ##  ##   ######  ##       ##     ## ########  ##     ## 
##     ##  ##        ## ##       ##     ## ##   ##   ##     ## 
##     ##  ##  ##    ## ##    ## ##     ## ##    ##  ##     ## 
########  ####  ######   ######   #######  ##     ## ########  
######## ####  ######  ##    ## ######## ########  ######  
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##     ##  ##       ##  ##   ##          ##    ##       
   ##     ##  ##       #####    ######      ##     ######  
   ##     ##  ##       ##  ##   ##          ##          ## 
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##    ####  ######  ##    ## ########    ##     ######  
Discord Tickets (​https://discordtickets.app​) bot v4.0.19 by eartharoid
Sponsor this project at https://discordtickets.app/sponsor
node:internal/modules/cjs/loader:1080
  throw err;
  ^
Error: Cannot find module '.prisma/client/index'
Require stack:
- /home/container/node_modules/@prisma/client/index.js
- /home/container/src/client.js
- /home/container/src/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/container/node_modules/@prisma/client/index.js:2:6)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/container/node_modules/@prisma/client/index.js',
    '/home/container/src/client.js',
    '/home/container/src/index.js'
  ]
}
Node.js v18.17.0

Expected Behavior

Start

Steps To Reproduce

No response

Environment

- OS: Linux
- Node:18
- NPM:7.6.3
- Bot: 4.0.19

Anything else?

No response

eartharoid commented 1 month ago

Can you send the npm logs from before the bot starts?

djdiaguuu123 commented 1 month ago

I have alredy fixed this issue. I had to old version of node js. I have another issue, I've installed bot but my web panel not working. Server not responding. I am using daki.cc. Is there any option to config it? 10/08/24 14:38:56 [ERROR] (HTTP) Error: listen EADDRNOTAVAIL: address not available 141.195.113.222:4300 at Server.setupListenHandle [as _listen2] (node:net:1734:21) at listenInCluster (node:net:1799:12) at doListen (node:net:1948:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'EADDRNOTAVAIL', errno: -99, syscall: 'listen', address: '141.195.113.222', port: 4300 } Is there any way to host panel separatly on another web server?

eartharoid commented 1 month ago

Change HTTP_INTERNAL back to 0.0.0.0.

djdiaguuu123 commented 1 month ago

I changed it and now i have this: 10/08/24 21:56:23 [ERROR] (HTTP) Error: listen EADDRNOTAVAIL: address not available 141.195.113.222:4300 at Server.setupListenHandle [as _listen2] (node:net:1734:21) at listenInCluster (node:net:1799:12) at doListen (node:net:1948:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'EADDRNOTAVAIL', errno: -99, syscall: 'listen', address: '141.195.113.222', port: 4300 } Of course web panel still not working.

eartharoid commented 1 month ago

Sorry, I meant HTTP_HOST, not HTTP_INTERNAL.

djdiaguuu123 commented 1 month ago

This site is unreachable Server 141.195.113.222 taking too long to respond.

djdiaguuu123 commented 1 month ago

Now there arent any errors in console but it still not works.

djdiaguuu123 commented 1 month ago
DISCORD_SECRET=secret
DISCORD_TOKEN=token
DB_PROVIDER=mysql
HTTP_EXTERNAL=https://141.195.113.222:4300
HTTP_HOST=0.0.0.0
HTTP_PORT=4300
HTTP_INTERNAL=141.195.113.222
HTTP_TRUST_PROXY=true
INVALIDATE_TOKENS=
OVERRIDE_ARCHIVE=
PUBLIC_BOT=false
PUBLISH_COMMANDS=true
SUPER=405657136379592704
DB_CONNECTION_URL="sql"
ENCRYPTION_KEY=key

My ENV

djdiaguuu123 commented 1 month ago

As you wrote on discord, i have chandeg HTTP_INTERNAL to HTTP_INTERNAL=http://127.0.0.1:4300 . Still not working. Do you know how to fix this? The console shows me that it supposedly works on http://127.0.0.1:4300/ but when I go to the external IP address provided by the hosting it doesn't work and shows that the page is not responding.

djdiaguuu123 commented 1 month ago

My console now:

########  ####  ######   ######   #######  ########  ########  
##     ##  ##  ##    ## ##    ## ##     ## ##     ## ##     ## 
##     ##  ##  ##       ##       ##     ## ##     ## ##     ## 
##     ##  ##   ######  ##       ##     ## ########  ##     ## 
##     ##  ##        ## ##       ##     ## ##   ##   ##     ## 
##     ##  ##  ##    ## ##    ## ##     ## ##    ##  ##     ## 
########  ####  ######   ######   #######  ##     ## ########  
######## ####  ######  ##    ## ######## ########  ######  
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##     ##  ##       ##  ##   ##          ##    ##       
   ##     ##  ##       #####    ######      ##     ######  
   ##     ##  ##       ##  ##   ##          ##          ## 
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##    ####  ######  ##    ## ########    ##     ######  
Discord Tickets (​https://discordtickets.app​) bot v4.0.19 by eartharoid
Sponsor this project at https://discordtickets.app/sponsor
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "category" autocompleter
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "references" autocompleter
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "tag" autocompleter
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "ticket" autocompleter
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "claim" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "close" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "create" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "edit" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "unclaim" button
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "Create ticket from message" message command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "Pin message" message command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "add" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "claim" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "close" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "force-close" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "help" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "move" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "new" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "priority" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "release" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "remove" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "tag" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "tickets" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "topic" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "transcript" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "transfer" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "Create ticket for user" user command
 11/08/24 20:48:25  [INFO] (MENUS) Loaded "create" menu
 11/08/24 20:48:25  [INFO] (MODALS) Loaded "feedback" modal
 11/08/24 20:48:25  [INFO] (MODALS) Loaded "questions" modal
 11/08/24 20:48:25  [INFO] (MODALS) Loaded "topic" modal
 11/08/24 20:48:30  [SUCCESS] Connected to Discord as "Helpdesk Varso#9070" over 1 shards
 11/08/24 20:48:30  [INFO] (PRISMA) quaint::pooled Starting a mysql pool with 25 connections.
 11/08/24 20:48:30  [SUCCESS] (HTTP) Listening at http://0.0.0.0:4300
 11/08/24 20:48:30  [INFO] Cached ticket count of 0 categories (0 open tickets)
 11/08/24 20:48:30  [INFO] Loaded 0 active cooldowns
 11/08/24 20:48:30  [INFO] Closed 0 deleted tickets
 11/08/24 20:48:30  [INFO] Automatically publishing commands...
 11/08/24 20:48:31  [INFO] Checking for updates...
 11/08/24 20:48:31  [SUCCESS] Published 18 commands
 11/08/24 20:48:31  [INFO] No updates available
 11/08/24 20:48:35  [SUCCESS] Posted client stats
eartharoid commented 1 month ago

Your HTTP_EXTERNAL value should start with http not https.

djdiaguuu123 commented 1 month ago

It still not works.