Nano Chad
Nano Chad
DIAdiscord.js - Imagine an app
Created by Nano Chad on 3/17/2025 in #djs-questions
Unable to run code in production, code isnt running after build
╭─[asus] as himanshu in ~/Projects/cfc-dc-bot-1 using node v23.7.0 on (discord.js)✘✘✘ 00:08:39
╰─(˚Д˚)ノ npm run start

> cfc-dc-bot@1.0.0 start
> NODE_ENV=production node build/index.js

Failed to initialize bot: Error: ENOENT: no such file or directory, scandir '/home/himanshu/Projects/cfc-dc-bot-1/build/core/events'
at Object.readdirSync (node:fs:1581:26)
at ExtendedClient.<anonymous> (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:119:47)
at Generator.next (<anonymous>)
at /home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:41:71
at new Promise (<anonymous>)
at __awaiter (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:37:12)
at ExtendedClient.loadEvents (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:114:16)
at ExtendedClient.<anonymous> (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:61:28)
at Generator.next (<anonymous>)
at /home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:41:71 {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/home/himanshu/Projects/cfc-dc-bot-1/build/core/events'
}
╭─[asus] as himanshu in ~/Projects/cfc-dc-bot-1 using node v23.7.0 on (discord.js)✘✘✘ 00:08:39
╰─(˚Д˚)ノ npm run start

> cfc-dc-bot@1.0.0 start
> NODE_ENV=production node build/index.js

Failed to initialize bot: Error: ENOENT: no such file or directory, scandir '/home/himanshu/Projects/cfc-dc-bot-1/build/core/events'
at Object.readdirSync (node:fs:1581:26)
at ExtendedClient.<anonymous> (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:119:47)
at Generator.next (<anonymous>)
at /home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:41:71
at new Promise (<anonymous>)
at __awaiter (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:37:12)
at ExtendedClient.loadEvents (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:114:16)
at ExtendedClient.<anonymous> (/home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:61:28)
at Generator.next (<anonymous>)
at /home/himanshu/Projects/cfc-dc-bot-1/build/core/client.js:41:71 {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/home/himanshu/Projects/cfc-dc-bot-1/build/core/events'
}
- [email protected] - nodejs v23.7.0
5 replies