node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'dotenv'
Require stack:
- /home/zppszwh8/public_html/budget.andamangas.com/server.js
- /usr/local/lsws/fcgi-bin/lsnode.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/zppszwh8/public_html/budget.andamangas.com/server.js:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/zppszwh8/public_html/budget.andamangas.com/server.js',
    '/usr/local/lsws/fcgi-bin/lsnode.js'
  ]
}

Node.js v20.18.1
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'dotenv'
Require stack:
- /home/zppszwh8/public_html/budget.andamangas.com/server.js
- /usr/local/lsws/fcgi-bin/lsnode.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/zppszwh8/public_html/budget.andamangas.com/server.js:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/zppszwh8/public_html/budget.andamangas.com/server.js',
    '/usr/local/lsws/fcgi-bin/lsnode.js'
  ]
}

Node.js v20.18.1
DB Error in findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
[LOGIN] DB error on findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
DB Error in findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
[LOGIN] DB error on findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
DB Error in findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
[LOGIN] DB error on findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
DB Error in findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
[LOGIN] DB error on findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
DB Error in findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
[LOGIN] DB error on findUserByEmail: Error: Access denied for user ''@'localhost' (using password: NO)
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at ClientHandshake.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlState: '28000',
  sqlMessage: "Access denied for user ''@'localhost' (using password: NO)",
  sql: undefined
}
Error getting budget summary: TypeError: keyAccountModel.getTotalBudget is not a function
    at exports.getBudgetSummary (/home/zppszwh8/public_html/budget.andamangas.com/controllers/keyAccountController.js:117:43)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at exports.authenticateToken (/home/zppszwh8/public_html/budget.andamangas.com/middleware/authMiddleware.js:28:5)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at /home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:346:12)
[LOGIN] Password mismatch for: sittichoke@peerapat.com
[LOGIN] Password mismatch for: aashish@peerapat.com
Error getting budget summary: TypeError: keyAccountModel.getTotalBudget is not a function
    at exports.getBudgetSummary (/home/zppszwh8/public_html/budget.andamangas.com/controllers/keyAccountController.js:117:43)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at exports.authenticateToken (/home/zppszwh8/public_html/budget.andamangas.com/middleware/authMiddleware.js:28:5)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at /home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:346:12)
Error getting budget summary: TypeError: keyAccountModel.getTotalBudget is not a function
    at exports.getBudgetSummary (/home/zppszwh8/public_html/budget.andamangas.com/controllers/keyAccountController.js:117:43)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at exports.authenticateToken (/home/zppszwh8/public_html/budget.andamangas.com/middleware/authMiddleware.js:28:5)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at /home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:346:12)
Error getting budget summary: TypeError: keyAccountModel.getTotalBudget is not a function
    at exports.getBudgetSummary (/home/zppszwh8/public_html/budget.andamangas.com/controllers/keyAccountController.js:117:43)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at exports.authenticateToken (/home/zppszwh8/public_html/budget.andamangas.com/middleware/authMiddleware.js:28:5)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/layer.js:95:5)
    at /home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/express/lib/router/index.js:346:12)
[VERIFY OTP] OTP expired for: ttk2rv30@gmail.com
[VERIFY OTP] OTP expired for: ttk2rv30@gmail.com
[VERIFY OTP] OTP expired for: ttk2rv30@gmail.com
DB Error in createPending: Error: Duplicate entry 'ttk2rv30@gmail.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'ttk2rv30@gmail.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('Sittichoke', 'Jitprasong', '0100193', 'ttk2rv30@gmail.com', '$2a$10$01MvMeIPz0khSki6eVSACuGsz5nkLKy/6ySDuVtaiS93b5w9ineEa', 'user', 'MIS', '176574', '2025-04-29 16:07:32.730')\n" +
    '  '
}
[REGISTER] DB error on createPending: Error: Duplicate entry 'ttk2rv30@gmail.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'ttk2rv30@gmail.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('Sittichoke', 'Jitprasong', '0100193', 'ttk2rv30@gmail.com', '$2a$10$01MvMeIPz0khSki6eVSACuGsz5nkLKy/6ySDuVtaiS93b5w9ineEa', 'user', 'MIS', '176574', '2025-04-29 16:07:32.730')\n" +
    '  '
}
/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740
    const err = new Error(message);
                ^

Error: Unknown column 'c.name' in 'order clause'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_BAD_FIELD_ERROR',
  errno: 1054,
  sqlState: '42S22',
  sqlMessage: "Unknown column 'c.name' in 'order clause'",
  sql: '\n' +
    '    SELECT bl.*\n' +
    '    FROM budget_limits bl\n' +
    "    WHERE bl.department_id = '17' AND bl.active = TRUE\n" +
    '    ORDER BY c.name\n' +
    '  '
}

Node.js v20.18.1
[LOGIN] Password mismatch for: dubeyaashish55@gmail.com
Error fetching budget master data: Error: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_CANT_AGGREGATE_2COLLATIONS',
  errno: 1267,
  sqlState: 'HY000',
  sqlMessage: "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='",
  sql: '\n' +
    '      SELECT \n' +
    '        bm.type,\n' +
    '        bm.key_account,\n' +
    '        bm.key_account_name,\n' +
    '        bm.overall,\n' +
    '        d.id as department,\n' +
    '        bm.department as department_name,\n' +
    '        bm.amount\n' +
    '      FROM budget_master bm\n' +
    '      JOIN budget_departments d ON bm.department = d.name\n' +
    '      ORDER BY bm.department, bm.type, bm.key_account_name\n' +
    '    '
}
Error fetching budget master data: Error: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_CANT_AGGREGATE_2COLLATIONS',
  errno: 1267,
  sqlState: 'HY000',
  sqlMessage: "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='",
  sql: '\n' +
    '      SELECT \n' +
    '        bm.type,\n' +
    '        bm.key_account,\n' +
    '        bm.key_account_name,\n' +
    '        bm.overall,\n' +
    '        d.id as department,\n' +
    '        bm.department as department_name,\n' +
    '        bm.amount\n' +
    '      FROM budget_master bm\n' +
    '      JOIN budget_departments d ON bm.department = d.name\n' +
    '      ORDER BY bm.department, bm.type, bm.key_account_name\n' +
    '    '
}
Error fetching budget master data: Error: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_CANT_AGGREGATE_2COLLATIONS',
  errno: 1267,
  sqlState: 'HY000',
  sqlMessage: "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='",
  sql: '\n' +
    '      SELECT \n' +
    '        bm.type,\n' +
    '        bm.key_account,\n' +
    '        bm.key_account_name,\n' +
    '        bm.overall,\n' +
    '        d.id as department,\n' +
    '        bm.department as department_name,\n' +
    '        bm.amount\n' +
    '      FROM budget_master bm\n' +
    '      JOIN budget_departments d ON bm.department = d.name\n' +
    '      ORDER BY bm.department, bm.type, bm.key_account_name\n' +
    '    '
}
Error fetching budget master data: Error: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_CANT_AGGREGATE_2COLLATIONS',
  errno: 1267,
  sqlState: 'HY000',
  sqlMessage: "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='",
  sql: '\n' +
    '      SELECT \n' +
    '        bm.type,\n' +
    '        bm.key_account,\n' +
    '        bm.key_account_name,\n' +
    '        bm.overall,\n' +
    '        d.id as department,\n' +
    '        bm.department as department_name,\n' +
    '        bm.amount\n' +
    '      FROM budget_master bm\n' +
    '      JOIN budget_departments d ON bm.department = d.name\n' +
    '      ORDER BY bm.department, bm.type, bm.key_account_name\n' +
    '    '
}
Error fetching budget master data: Error: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_CANT_AGGREGATE_2COLLATIONS',
  errno: 1267,
  sqlState: 'HY000',
  sqlMessage: "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='",
  sql: '\n' +
    '      SELECT \n' +
    '        bm.type,\n' +
    '        bm.key_account,\n' +
    '        bm.key_account_name,\n' +
    '        bm.overall,\n' +
    '        d.id as department,\n' +
    '        bm.department as department_name,\n' +
    '        bm.amount\n' +
    '      FROM budget_master bm\n' +
    '      JOIN budget_departments d ON bm.department = d.name\n' +
    '      ORDER BY bm.department, bm.type, bm.key_account_name\n' +
    '    '
}
Error fetching budget master data: Error: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_CANT_AGGREGATE_2COLLATIONS',
  errno: 1267,
  sqlState: 'HY000',
  sqlMessage: "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='",
  sql: '\n' +
    '      SELECT \n' +
    '        bm.type,\n' +
    '        bm.key_account,\n' +
    '        bm.key_account_name,\n' +
    '        bm.overall,\n' +
    '        d.id as department,\n' +
    '        bm.department as department_name,\n' +
    '        bm.amount\n' +
    '      FROM budget_master bm\n' +
    '      JOIN budget_departments d ON bm.department = d.name\n' +
    '      ORDER BY bm.department, bm.type, bm.key_account_name\n' +
    '    '
}
/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740
    const err = new Error(message);
                ^

Error: Unknown column 'c.name' in 'order clause'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_BAD_FIELD_ERROR',
  errno: 1054,
  sqlState: '42S22',
  sqlMessage: "Unknown column 'c.name' in 'order clause'",
  sql: '\n' +
    '    SELECT bl.*\n' +
    '    FROM budget_limits bl\n' +
    "    WHERE bl.department_id = '44' AND bl.active = TRUE\n" +
    '    ORDER BY c.name\n' +
    '  '
}

Node.js v20.18.1
/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740
    const err = new Error(message);
                ^

Error: Unknown column 'c.name' in 'order clause'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_BAD_FIELD_ERROR',
  errno: 1054,
  sqlState: '42S22',
  sqlMessage: "Unknown column 'c.name' in 'order clause'",
  sql: '\n' +
    '    SELECT bl.*\n' +
    '    FROM budget_limits bl\n' +
    "    WHERE bl.department_id = '44' AND bl.active = TRUE\n" +
    '    ORDER BY c.name\n' +
    '  '
}

Node.js v20.18.1
/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740
    const err = new Error(message);
                ^

Error: Unknown column 'c.name' in 'order clause'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_BAD_FIELD_ERROR',
  errno: 1054,
  sqlState: '42S22',
  sqlMessage: "Unknown column 'c.name' in 'order clause'",
  sql: '\n' +
    '    SELECT bl.*\n' +
    '    FROM budget_limits bl\n' +
    "    WHERE bl.department_id = '44' AND bl.active = TRUE\n" +
    '    ORDER BY c.name\n' +
    '  '
}

Node.js v20.18.1
/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740
    const err = new Error(message);
                ^

Error: Unknown column 'c.name' in 'order clause'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_BAD_FIELD_ERROR',
  errno: 1054,
  sqlState: '42S22',
  sqlMessage: "Unknown column 'c.name' in 'order clause'",
  sql: '\n' +
    '    SELECT bl.*\n' +
    '    FROM budget_limits bl\n' +
    "    WHERE bl.department_id = '44' AND bl.active = TRUE\n" +
    '    ORDER BY c.name\n' +
    '  '
}

Node.js v20.18.1
[VERIFY OTP] Invalid OTP for: kittiya@peerapat.com
[LOGIN] No user found for: pridsana@peerapat.com
[LOGIN] No user found for: pridsana@peerapat.com
[LOGIN] No user found for: pridsana@peerapat.com
[LOGIN] No user found for: pridsana@peerapat.com
[LOGIN] No user found for: Sirinya@peerapat.com
[LOGIN] No user found for: Jeeraphun@perapat.com
[LOGIN] No user found for: Jeeraphunsangcham@gmail.com
[LOGIN] No user found for: Jeeraphunsangcham@gmail.com
[LOGIN] No user found for: jeeraphun@peerapat.com
[LOGIN] No user found for: Jeeraphun@peerapat.com
[VERIFY OTP] Invalid OTP for: yutida@peerapat.com
[VERIFY OTP] Invalid OTP for: yutida@peerapat.com
[VERIFY OTP] Invalid OTP for: yutida@peerapat.com
[VERIFY OTP] Invalid OTP for: yutida@peerapat.com
[LOGIN] No user found for: yutida@peerapat.com
[LOGIN] No user found for: yutida@peerapat.com
[LOGIN] No user found for: yutida@peerapat.com
[LOGIN] No user found for: yutida@peerapat.com
[LOGIN] No user found for: yutida@peerapat.com
[LOGIN] No user found for: yutida@peerapat.com
DB Error in createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$LO9AYDSTggbXfrhroWLxBuDtvExmDUnS0vi8AwI.EUjEjtNaxZwiq', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '164661', '2025-05-06 14:42:11.068')\n" +
    '  '
}
[REGISTER] DB error on createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$LO9AYDSTggbXfrhroWLxBuDtvExmDUnS0vi8AwI.EUjEjtNaxZwiq', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '164661', '2025-05-06 14:42:11.068')\n" +
    '  '
}
DB Error in createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$rRY5c5byOiM0wsG38f3tguwmkiJ73CEY2tYue5IKyW/kDifvi0jn.', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '861997', '2025-05-06 14:42:17.770')\n" +
    '  '
}
[REGISTER] DB error on createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$rRY5c5byOiM0wsG38f3tguwmkiJ73CEY2tYue5IKyW/kDifvi0jn.', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '861997', '2025-05-06 14:42:17.770')\n" +
    '  '
}
DB Error in createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$NiXnshCzF85hzVzcPdIsO.QMFVwOH13LODYwoBI5TWMQlF6N23tBq', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '102388', '2025-05-06 14:42:54.453')\n" +
    '  '
}
[REGISTER] DB error on createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$NiXnshCzF85hzVzcPdIsO.QMFVwOH13LODYwoBI5TWMQlF6N23tBq', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '102388', '2025-05-06 14:42:54.453')\n" +
    '  '
}
[LOGIN] No user found for: yutida@peerapat.com
[LOGIN] No user found for: yutida@peerapat.com
DB Error in createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$6BBnCSCSWf3OAJEQd2HBdO/WlvhtCFuojrum7/9ezwJ5jLtPECfCu', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '503090', '2025-05-06 14:43:58.999')\n" +
    '  '
}
[REGISTER] DB error on createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$6BBnCSCSWf3OAJEQd2HBdO/WlvhtCFuojrum7/9ezwJ5jLtPECfCu', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '503090', '2025-05-06 14:43:58.999')\n" +
    '  '
}
DB Error in createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$cANhngtL1t0kxlGqrl/D6exNgdI.IQm43sVroppwdcjTI9NByp7cy', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '167289', '2025-05-06 14:50:58.049')\n" +
    '  '
}
[REGISTER] DB error on createPending: Error: Duplicate entry 'yutida@peerapat.com' for key 'email'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry 'yutida@peerapat.com' for key 'email'",
  sql: '\n' +
    '    INSERT INTO budget_pending_users \n' +
    '      (name, surname, employee_id, email, password, role, department, otp, otp_expiry)\n' +
    "    VALUES ('ยุธิดา ', 'นิ่มแก้ว', '0100020', 'yutida@peerapat.com', '$2a$10$cANhngtL1t0kxlGqrl/D6exNgdI.IQm43sVroppwdcjTI9NByp7cy', 'user', 'S180101 แผนกศูนย์ธุรกิจหาดใหญ่', '167289', '2025-05-06 14:50:58.049')\n" +
    '  '
}
[LOGIN] No user found for: Jeeraphunsangcham@gmail.com
[LOGIN] No user found for: Tharis@peerapat.com
[LOGIN] No user found for: Tharis@peerapat.com
[LOGIN] No user found for: Kitipong@peerapat.com
[LOGIN] No user found for: Kittipong@peerapat.com
[LOGIN] No user found for: Kittipong@peerapat.com
[LOGIN] No user found for: Kittipong@peerapat.com
[LOGIN] Password mismatch for: aashish@peerapat.com
[REGISTER] Email in use: chatchawan@peerapat.com
[REGISTER] Email in use: jureerat@peerapat.com
[REGISTER] Email in use: jureerat@peerapat.com
[LOGIN] Password mismatch for: dubeyaashish55@gmail.com
DB Error in createUser: Error: Duplicate entry '0100091' for key 'employee_id'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry '0100091' for key 'employee_id'",
  sql: '\n' +
    '    INSERT INTO budget_users\n' +
    '      (name, surname, employee_id, email, password, role, department)\n' +
    "    VALUES ('Jureerat', 'Lekmak', '0100091', 'jureeratlek@gmail.com', '$2a$10$VZ65oDhozjPvw8P2W4HGJuhsZjRHUY.HxJWogn2TRFmPxS0Pouqj6', 'user', 'F210101 แผนกควบคุมคุณภาพ QC')\n" +
    '  '
}
[VERIFY OTP] DB error on createUser: Error: Duplicate entry '0100091' for key 'employee_id'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry '0100091' for key 'employee_id'",
  sql: '\n' +
    '    INSERT INTO budget_users\n' +
    '      (name, surname, employee_id, email, password, role, department)\n' +
    "    VALUES ('Jureerat', 'Lekmak', '0100091', 'jureeratlek@gmail.com', '$2a$10$VZ65oDhozjPvw8P2W4HGJuhsZjRHUY.HxJWogn2TRFmPxS0Pouqj6', 'user', 'F210101 แผนกควบคุมคุณภาพ QC')\n" +
    '  '
}
DB Error in createUser: Error: Duplicate entry '0100091' for key 'employee_id'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry '0100091' for key 'employee_id'",
  sql: '\n' +
    '    INSERT INTO budget_users\n' +
    '      (name, surname, employee_id, email, password, role, department)\n' +
    "    VALUES ('Jureerat', 'Lekmak', '0100091', 'jureeratlek@gmail.com', '$2a$10$VZ65oDhozjPvw8P2W4HGJuhsZjRHUY.HxJWogn2TRFmPxS0Pouqj6', 'user', 'F210101 แผนกควบคุมคุณภาพ QC')\n" +
    '  '
}
[VERIFY OTP] DB error on createUser: Error: Duplicate entry '0100091' for key 'employee_id'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry '0100091' for key 'employee_id'",
  sql: '\n' +
    '    INSERT INTO budget_users\n' +
    '      (name, surname, employee_id, email, password, role, department)\n' +
    "    VALUES ('Jureerat', 'Lekmak', '0100091', 'jureeratlek@gmail.com', '$2a$10$VZ65oDhozjPvw8P2W4HGJuhsZjRHUY.HxJWogn2TRFmPxS0Pouqj6', 'user', 'F210101 แผนกควบคุมคุณภาพ QC')\n" +
    '  '
}
DB Error in createUser: Error: Duplicate entry '0100091' for key 'employee_id'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry '0100091' for key 'employee_id'",
  sql: '\n' +
    '    INSERT INTO budget_users\n' +
    '      (name, surname, employee_id, email, password, role, department)\n' +
    "    VALUES ('Jureerat', 'Lekmak', '0100091', 'jureeratlek@gmail.com', '$2a$10$VZ65oDhozjPvw8P2W4HGJuhsZjRHUY.HxJWogn2TRFmPxS0Pouqj6', 'user', 'F210101 แผนกควบคุมคุณภาพ QC')\n" +
    '  '
}
[VERIFY OTP] DB error on createUser: Error: Duplicate entry '0100091' for key 'employee_id'
    at Packet.asError (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packets/packet.js:740:17)
    at Query.execute (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/commands/command.js:29:26)
    at PoolConnection.handlePacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:475:34)
    at PacketParser.onPacket (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:93:12)
    at PacketParser.executeStart (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/home/zppszwh8/nodevenv/public_html/budget.andamangas.com/20/lib/node_modules/mysql2/lib/base/connection.js:100:25)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry '0100091' for key 'employee_id'",
  sql: '\n' +
    '    INSERT INTO budget_users\n' +
    '      (name, surname, employee_id, email, password, role, department)\n' +
    "    VALUES ('Jureerat', 'Lekmak', '0100091', 'jureeratlek@gmail.com', '$2a$10$VZ65oDhozjPvw8P2W4HGJuhsZjRHUY.HxJWogn2TRFmPxS0Pouqj6', 'user', 'F210101 แผนกควบคุมคุณภาพ QC')\n" +
    '  '
}
[LOGIN] No user found for: jureeratlek@gmail.com
[LOGIN] No user found for: kusumar@peerapat.com
[LOGIN] No user found for: Environment@peerapat.com
[LOGIN] No user found for: ttk2rv30@gmail.com
[LOGIN] No user found for: sittichoke@peerapat.com
[LOGIN] No user found for: sittichoke@peerapat.com
[LOGIN] No user found for: sittichoke@peerapat.com
[LOGIN] No user found for: sittichoke@peerapat.com
[LOGIN] No user found for: sittichoke@ppsuite.com
[LOGIN] No user found for: sittichoke@peerapat.com
[LOGIN] No user found for: pybc@peerapat.com
[LOGIN] Password mismatch for: pybc@peerapat.com
