Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am having problem with the modules #1

Closed
Vaibhav-Naik-26 opened this issue May 19, 2022 · 9 comments
Closed

I am having problem with the modules #1

Vaibhav-Naik-26 opened this issue May 19, 2022 · 9 comments

Comments

@Vaibhav-Naik-26
Copy link

Vaibhav-Naik-26 commented May 19, 2022

I request you to please provide package.json and package-lock.json .

i am getting this error

 node index.js
internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module 'node:events'
Require stack:
- /home/runner/Ticket-Bot/node_modules/discord.js/src/client/BaseClient.js
- /home/runner/Ticket-Bot/node_modules/discord.js/src/index.js
- /home/runner/Ticket-Bot/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/Ticket-Bot/node_modules/discord.js/src/client/BaseClient.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/Ticket-Bot/node_modules/discord.js/src/client/BaseClient.js',
    '/home/runner/Ticket-Bot/node_modules/discord.js/src/index.js',
    '/home/runner/Ticket-Bot/index.js'
  ]
}
exit status 1

i fixed the above issue

and then when i run , it was showing some error with chalk so i downgraded it and then when i run , it is showing this error
please help, this i can't fix

TypeError: Cannot read properties of undefined (reading 'SHARD_LIST')
    at Object.<anonymous> (/home/runner/Ticket-Bot/index.js:9:26)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
@master1ous
Copy link
Owner

For the 2nd issue, run cluster.js not index.js

@OnionDev1885
Copy link

For the first issue: Upgrade NodeJS Version.

@Vaibhav-Naik-26
Copy link
Author

For the 2nd issue, run cluster.js not index.js

i run cluster.js now and it shows error

 node cluster.js
/home/runner/Ticket-Bot/node_modules/discord-hybrid-sharding/src/Structures/Queue.js:73
            timeout: item.timeout ?? this.options.timeout,
                                   ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/Ticket-Bot/node_modules/discord-hybrid-sharding/src/Core/ClusterManager.js:9:15)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
exit status 1

@master1ous
Copy link
Owner

Like said, install node 16+

@Vaibhav-Naik-26
Copy link
Author

#1 (comment)

still error, mine is node 16.9

@Vaibhav-Naik-26
Copy link
Author

I request the @mipcit1010 to add package.json file.

@Technology-King
Copy link

I request again, @mipcit1010 to add package.json file.

@master1ous
Copy link
Owner

I request again, @mipcit1010 to add package.json file.

Hello, sorry for the inconvenience but this code is no longer supported,
There is a new repository for a Demo ticket bot using mongo db, which works.
I might upload a newer version of this current code sometime.

@Vaibhav-Naik-26
Copy link
Author

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants