TypeError: Cannot read properties of undefined (reading 'process')

When i launch my file it gives me this error and I dont know why.
23 Replies
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
MoinAmMorgen
MoinAmMorgen17mo ago
yes
MrMythical
MrMythical17mo ago
you are doing .process somewhere show full error
MoinAmMorgen
MoinAmMorgen17mo ago
My title is the full error,
Idris
Idris17mo ago
no
MrMythical
MrMythical17mo ago
doubt
MoinAmMorgen
MoinAmMorgen17mo ago
i dont get anything else
Idris
Idris17mo ago
missing the stack
MoinAmMorgen
MoinAmMorgen17mo ago
?
MrMythical
MrMythical17mo ago
where stack trace? sad
Daro
Daro17mo ago
don't stringify the error, send the full error
Idris
Idris17mo ago
DiscordAPIError[10062]: Unknown interaction
at SequentialHandler.runRequest (/root/ObitoInteractions/node_modules/@discordjs/rest/dist/index.js:667:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.queueRequest (/root/ObitoInteractions/node_modules/@discordjs/rest/dist/index.js:464:14)
at async REST.request (/root/ObitoInteractions/node_modules/@discordjs/rest/dist/index.js:910:22)
at async ChatInputCommandInteraction.reply (/root/ObitoInteractions/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Object.execute (/root/ObitoInteractions/src/events/interactionCreate.js:66:21)
at async Client.<anonymous> (/root/ObitoInteractions/src/structure/Client.js:136:25) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1064658087170019389/aW50ZXJhY3Rpb246MTA2NDY1ODA4NzE3MDAxOTM4OTpHQ1pZQml2bXVZNW15VnpnSEhpUnlhWUs4M01QZHY0a2JURnlHdzdWZ0lYc1F5WWZEUTIxSG1rQmJ6RmxkVUxkUzhsdm8zcExBZUxwVERVeGRVU3E2MjJ4VTNUWlY5aTVVQUh4V280U1lUUFBRa2FObEp5RjMyUjRFaThTV1V6Rg/callback'
}
DiscordAPIError[10062]: Unknown interaction
at SequentialHandler.runRequest (/root/ObitoInteractions/node_modules/@discordjs/rest/dist/index.js:667:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.queueRequest (/root/ObitoInteractions/node_modules/@discordjs/rest/dist/index.js:464:14)
at async REST.request (/root/ObitoInteractions/node_modules/@discordjs/rest/dist/index.js:910:22)
at async ChatInputCommandInteraction.reply (/root/ObitoInteractions/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Object.execute (/root/ObitoInteractions/src/events/interactionCreate.js:66:21)
at async Client.<anonymous> (/root/ObitoInteractions/src/structure/Client.js:136:25) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1064658087170019389/aW50ZXJhY3Rpb246MTA2NDY1ODA4NzE3MDAxOTM4OTpHQ1pZQml2bXVZNW15VnpnSEhpUnlhWUs4M01QZHY0a2JURnlHdzdWZ0lYc1F5WWZEUTIxSG1rQmJ6RmxkVUxkUzhsdm8zcExBZUxwVERVeGRVU3E2MjJ4VTNUWlY5aTVVQUh4V280U1lUUFBRa2FObEp5RjMyUjRFaThTV1V6Rg/callback'
}
this is a full error for example
MoinAmMorgen
MoinAmMorgen17mo ago
TypeError: Cannot read properties of undefined (reading 'process') at C:\Users\Niklas\Documents\MCT-System\src\registerCommands.js:18:68 at Object.<anonymous> (C:\Users\Niklas Pfeffer\Documents\MCT-System\src\registerCommands.js:26:3) at Module._compile (node:internal/modules/cjs/loader:1159:14) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47
Idris
Idris17mo ago
registerCommands.js line 18
MrMythical
MrMythical17mo ago
line 18 of registerCommands.js
MoinAmMorgen
MoinAmMorgen17mo ago
Line 18 is this: Routes.applicationGuildCommands(process.env.CLIENT_ID. process.env.GUILD_ID), Ah see the error
MrMythical
MrMythical17mo ago
I'm intrigued what problem did you find
MoinAmMorgen
MoinAmMorgen17mo ago
Yes
MrMythical
MrMythical17mo ago
oh lol
MoinAmMorgen
MoinAmMorgen17mo ago
xD ok thanks for the help tho
MrMythical
MrMythical17mo ago
well... CLIENT_ID is undefined anyway so you'll have to fix that
MoinAmMorgen
MoinAmMorgen17mo ago
its not, its in my .env
MrMythical
MrMythical17mo ago
sus