ReferenceError: client is not defined
Node.js v21.6.2
PS C:\Users\clou1\Downloads\archive-2024-03-16T014232Z> node .
C:\Users\clou1\Downloads\archive-2024-03-16T014232Z\index.js:5
client.on('ready', () => {
^
ReferenceError: client is not defined
at Object.<anonymous> (C:\Users\clou1\Downloads\archive-2024-03-16T014232Z\index.js:5:1)
at Module._compile (node:internal/modules/cjs/loader:1378:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
at Module.load (node:internal/modules/cjs/loader:1212:32)
at Module._load (node:internal/modules/cjs/loader:1028:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
at node:internal/main/run_main_module:28:49
Node.js v21.6.2
PS C:\Users\clou1\Downloads\archive-2024-03-16T014232Z> node .
C:\Users\clou1\Downloads\archive-2024-03-16T014232Z\index.js:5
client.on('ready', () => {
^
ReferenceError: client is not defined
at Object.<anonymous> (C:\Users\clou1\Downloads\archive-2024-03-16T014232Z\index.js:5:1)
at Module._compile (node:internal/modules/cjs/loader:1378:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1437:10)
at Module.load (node:internal/modules/cjs/loader:1212:32)
at Module._load (node:internal/modules/cjs/loader:1028:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
at node:internal/main/run_main_module:28:49
6 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!reset your token
i just did
:mdn: Scope
The scope is the current context of execution in which values and expressions are "visible" or can be referenced. If a variable or expression is not in the current scope, it will not be available for use. Scopes can also be layered in a hierarchy, so that child scopes have access to parent scopes, but not vice versa.
-
ReferenceError: "x" is not defined
: learn more
- TypeError: Cannot read properties of undefined/null (reading "x")
: learn moredont understand
Unknown Userβ’10mo ago
Message Not Public
Sign In & Join Server To View