4i8/QuranBot

Assalamu aleykun Ahi can u help me pls?

Closed this issue · 6 comments

 npm run start

quranbot@1.4.2 start
concurrently "node ./src/shard.js" "node ./extensions/prayer.js"

[1] node:internal/modules/cjs/loader:998
[1] throw err;
[1] ^
[1]
[1] Error: Cannot find module '../src/config.json'
[1] Require stack:
[1] - /home/runner/QuranBot/extensions/prayer.js
[1] at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
[1] at Module._load (node:internal/modules/cjs/loader:841:27)
[1] at Module.require (node:internal/modules/cjs/loader:1061:19)
[1] at require (node:internal/modules/cjs/helpers:103:18)
[1] at Object. (/home/runner/QuranBot/extensions/prayer.js:2:33)
[1] at Module._compile (node:internal/modules/cjs/loader:1159:14)
[1] at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
[1] at Module.load (node:internal/modules/cjs/loader:1037:32)
[1] at Module._load (node:internal/modules/cjs/loader:878:12)
[1] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
[1] code: 'MODULE_NOT_FOUND',
[1] requireStack: [ '/home/runner/QuranBot/extensions/prayer.js' ]
[1] }
[1]
[1] Node.js v18.12.1
[1] node ./extensions/prayer.js exited with code 1
[0] node:internal/modules/cjs/loader:998
[0] throw err;
[0] ^
[0]
[0] Error: Cannot find module './config.json'
[0] Require stack:
[0] - /home/runner/QuranBot/src/shard.js
[0] at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
[0] at Module._load (node:internal/modules/cjs/loader:841:27)
[0] at Module.require (node:internal/modules/cjs/loader:1061:19)
[0] at require (node:internal/modules/cjs/helpers:103:18)
[0] at Object. (/home/runner/QuranBot/src/shard.js:3:16)
[0] at Module._compile (node:internal/modules/cjs/loader:1159:14)
[0] at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
[0] at Module.load (node:internal/modules/cjs/loader:1037:32)
[0] at Module._load (node:internal/modules/cjs/loader:878:12)
[0] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
[0] code: 'MODULE_NOT_FOUND',
[0] requireStack: [ '/home/runner/QuranBot/src/shard.js' ]
[0] }
[0]
[0] Node.js v18.12.1
[0] node ./src/shard.js exited with code 1

I prescribed npm install! token too correct!

4i8 commented

I prescribed npm install! token too correct!

config.example.json to config.json

 npm run start

quranbot@1.4.2 start
concurrently "node ./src/shard.js" "node ./extensions/prayer.js"

[1] (node:207) [MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning.
[1] (Use node --trace-deprecation ... to show where the warning was created)
[0] Error [TOKEN_MISSING]: Request to use token, but token was unavailable to the client.
[0] at Util.fetchRecommendedShards (/home/runner/QuranBot/node_modules/discord.js/src/util/Util.js:361:23)
[0] at ShardingManager.spawn (/home/runner/QuranBot/node_modules/discord.js/src/sharding/ShardingManager.js:186:27)
[0] at Object. (/home/runner/QuranBot/src/shard.js:13:3)
[0] at Module._compile (node:internal/modules/cjs/loader:1159:14)
[0] at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
[0] at Module.load (node:internal/modules/cjs/loader:1037:32)
[0] at Module._load (node:internal/modules/cjs/loader:878:12)
[0] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[0] at node:internal/main/run_main_module:23:47 {
[0] [Symbol(code)]: 'TOKEN_MISSING'
[0] }
[0] node ./src/shard.js exited with code 0
[1] Connect To MongoDB Successfully
[1] Prayer Started Successfully
[1] [COUNTRY] [Algiers]:Africa/Algiers
[1] [PRAYER] Algiers is not found in database
[1] [COUNTRY] [Capetown]:Africa/Johannesburg
[1] /home/runner/QuranBot/node_modules/mongodb/lib/cmap/connection.js:231
[1] callback(new error_1.MongoServerError(document));
[1] ^
[1]
[1] MongoServerError: cannot create a new collection -- already using 500 collections of 500
[1] at Connection.onMessage (/home/runner/QuranBot/node_modules/mongodb/lib/cmap/connection.js:231:30)
[1] at MessageStream. (/home/runner/QuranBot/node_modules/mongodb/lib/cmap/connection.js:61:60)
[1] at MessageStream.emit (node:events:513:28)
[1] at processIncomingData (/home/runner/QuranBot/node_modules/mongodb/lib/cmap/message_stream.js:125:16)
[1] at MessageStream._write (/home/runner/QuranBot/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
[1] at writeOrBuffer (node:internal/streams/writable:392:12)
[1] at _write (node:internal/streams/writable:333:10)
[1] at Writable.write (node:internal/streams/writable:337:10)
[1] at TLSSocket.ondata (node:internal/streams/readable:766:22)
[1] at TLSSocket.emit (node:events:513:28) {
[1] ok: 0,
[1] code: 8000,
[1] codeName: 'AtlasError',
[1] [Symbol(errorLabels)]: Set(0) {}
[1] }
[1]
[1] Node.js v18.12.1
[1] node ./extensions/prayer.js exited with code 1
exit status 1

https://cdn.discordapp.com/attachments/1111001900624650270/1132424064686891168/1.png
https://cdn.discordapp.com/attachments/1111001900624650270/1132424064921763871/2.png

4i8 commented

cannot create a new collection -- already using 500 collections of 500.

I think you already have 500 collections in your database. Create a new database And use it

how does the MongoDB connection string look like inside the config.json

4i8 commented

how does the MongoDB connection string look like inside the config.json

alekom asllam like this
mongodb://<username>:<password>@<host>:<port>/<default_database>?<options>