Closed MichaelDA123 closed 1 year ago
Howdy @MichaelDA123 , seem the node was unable to locate a file it was looking for, a few things that may help.
Make sure the .env
is present in /Master-Bot/
folder
Run cmd.exe
in administrator when running npm run dev
Much Love -Bacon
@Bacon-Fixation Ah yes, for the .env
file i've put it in root folder but the error still same
There is 2 env, .env.example and
.docker.env
. im just setup .env.example
because I'm never use docker before, and I'm planning to host the bot in hosting service.
this took a bit to replicate, my apology for the delay, this seems to be a Windows specific issue. Add C:\Windows\System32
to the PATH
environment variable,
Start search for "edit environment variables for your account", click new and set the name as PATH
and the value to C:\Windows\System32
click ok
should look something like this
and give it another try, may have to restart pc and/or your IDE you are using to accesses the cmd.exe
Much Love -Bacon
@Bacon-Fixation aah its works thxs :), but when i trying to host the bot in hosting service this error comes up.
[1] 08-03-2023 08:12:10 info: Twitch-Features are Disabled
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:11 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] 08-03-2023 08:12:12 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:12 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:13 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:13 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:13 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:13 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:14 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:14 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:15 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:15 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:16 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
[1] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16)
[1] 08-03-2023 08:12:16 error: Redis Error: connect ECONNREFUSED 127.0.0.1:6379
[1] /home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250
[1] throw new DiscordjsError(unrecoverableErrorCodeMap[error.code]);
[1] ^
[1]
[1] Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
[1] at WebSocketManager.createShards (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250:15)
[1] at async ExtendedClient.login (/home/container/node_modules/discord.js/src/client/Client.js:226:7)
[1] at async ExtendedClient.login (/home/container/node_modules/@sapphire/framework/dist/lib/SapphireClient.js:76:19) {
[1] code: 'DisallowedIntents'
[1] }
[1]
[1] Node.js v17.9.1
[1] npm ERR! Lifecycle script start
failed with error:
npm ERR! Lifecycle script start
failed with error:
[1] npm ERR! Error: command failed
[1] npm ERR! in workspace: master-bot@1.0.0
npm ERR! at location: /home/container/packages/bot
[1] npm run dev:bot exited with code 1
Seems that the redis server is not running on localhost More Info bot looks for a redis connection at 127.0.0.1:6379 (localhost) by default it assumes redis is running on the same host as the nodejs instance, if you would like to assign a different location you can add REDIS_HOST='url2redisServer'
REDIS_PORT=5679
to the bottom of the .env
to connect to an outside redis server
Redis options available through the .env
REDIS_HOST="url2redis"
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD="redisPassword"
I hope this helps
Much Love -Bacon
Howdy @MichaelDA123, Just wanted to catch up with you, and see if you were still having issues
Much Love -Bacon
@MichaelDA123 gunna go head and close this issue. If you are still having issues or have suggestions, please feel free to open a new tap
Much Love -Bacon
Hello i want to asking for this error, i've follow all the instructions step by step but when i try to npm run dev. it show like this I'm using v18.17.0 Node
[0] Error occurred when executing command: npm run dev:dashboard [0] Error: spawn cmd.exe ENOENT [0] at ChildProcess._handle.onexit (node:internal/child_process:283:19) [0] at onErrorNT (node:internal/child_process:476:16) [0] at process.processTicksAndRejections (node:internal/process/task_queues:82:21) [1] Error occurred when executing command: npm run dev:bot [1] Error: spawn cmd.exe ENOENT [1] at ChildProcess._handle.onexit (node:internal/child_process:283:19) [1] at onErrorNT (node:internal/child_process:476:16) [1] at process.processTicksAndRejections (node:internal/process/task_queues:82:21) [1] npm run dev:bot exited with code -4058 [0] npm run dev:dashboard exited with code -4058