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 User3y ago
Message Not Public
Sign In & Join Server To View
MoinAmMorgen
MoinAmMorgenOP3y ago
yes
MrMythical
MrMythical3y ago
you are doing .process somewhere show full error
MoinAmMorgen
MoinAmMorgenOP3y ago
My title is the full error,
</> Idris
</> Idris3y ago
no
MrMythical
MrMythical3y ago
doubt
MoinAmMorgen
MoinAmMorgenOP3y ago
i dont get anything else
</> Idris
</> Idris3y ago
missing the stack
MoinAmMorgen
MoinAmMorgenOP3y ago
?
MrMythical
MrMythical3y ago
where stack trace? sad
Daro
Daro3y ago
don't stringify the error, send the full error
</> Idris
</> Idris3y 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
MoinAmMorgenOP3y 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
</> Idris3y ago
registerCommands.js line 18
MrMythical
MrMythical3y ago
line 18 of registerCommands.js
MoinAmMorgen
MoinAmMorgenOP3y ago
Line 18 is this: Routes.applicationGuildCommands(process.env.CLIENT_ID. process.env.GUILD_ID), Ah see the error
MrMythical
MrMythical3y ago
I'm intrigued what problem did you find
MoinAmMorgen
MoinAmMorgenOP3y ago
Yes
MrMythical
MrMythical3y ago
oh lol
MoinAmMorgen
MoinAmMorgenOP3y ago
xD ok thanks for the help tho
MrMythical
MrMythical3y ago
well... CLIENT_ID is undefined anyway so you'll have to fix that
MoinAmMorgen
MoinAmMorgenOP3y ago
its not, its in my .env
MrMythical
MrMythical3y ago
sus

Did you find this page helpful?