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

Starting bot throws error #3

Closed
j-b-hunter opened this issue Nov 11, 2020 · 21 comments
Closed

Starting bot throws error #3

j-b-hunter opened this issue Nov 11, 2020 · 21 comments
Labels
bug Something isn't working selfhost The probem happened while trying to selfhost

Comments

@j-b-hunter
Copy link

This is the error: https://i.imgur.com/doBrRew.png
Ive set my shards to 0 on the controller.

My devToken is valid, my sql tables are set up correctly but it looks to be forcing the controller token space to be filled.

Once I fill it with the token, the bot loads but doesnt respond to any commands.

@chaun14
Copy link
Owner

chaun14 commented Nov 11, 2020

The token provided for your bot controller isn't valid.

the shard count can't be set to 0 btw, otherwhise no shards will spawn. For a single shard set it to 1

(dev token and controller bot token shouldn't be the same)

@j-b-hunter
Copy link
Author

The token provided for your bot controller isn't valid.

the shard count can't be set to 0 btw, otherwhise no shards will spawn. For a single shard set it to 1

(dev token and controller bot token shouldn't be the same)

I also tried setting a new token specifically for the controller, and shards at 1. The bots both load but dont respond to commands.

@chaun14
Copy link
Owner

chaun14 commented Nov 11, 2020

Please send the error when config are set to that.

@chaun14 chaun14 added the bug Something isn't working label Nov 11, 2020
@j-b-hunter
Copy link
Author

There is no error, it just doesnt respond to commands, shows only controller connects

@chaun14
Copy link
Owner

chaun14 commented Nov 11, 2020

So it work well. You need to run the command .startAll with the controller and the bot should start

@j-b-hunter
Copy link
Author

Stuck on Shard 1 this is the error

https://i.imgur.com/gYVxZip.png

@chaun14
Copy link
Owner

chaun14 commented Nov 11, 2020

uh try to found the error with the npm run dev command.

@chaun14
Copy link
Owner

chaun14 commented Nov 11, 2020

oh I remember, run the npm run build command and then restart the controller

@KiwiTerra
Copy link

KiwiTerra commented Nov 12, 2020

I also have this error:

root@nolan:~/invite-manager-bot# npm run dev

[email protected] dev /root/invite-manager-bot
cross-env NODE_ENV=dev node scripts/dev-run.js

Debugger listening on ws://127.0.0.1:44444/5c7917cf-d6ab-40b9-a52f-6f6dc83c3e85
For help, see: https://nodejs.org/en/docs/inspector
internal/modules/cjs/loader.js:450
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rest/RequestHandler' is not defined by "exports" in /root/invite-manager-bot/node_modules/eris/package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:285:9)
at packageExportsResolve (internal/modules/esm/resolve.js:491:3)
at resolveExports (internal/modules/cjs/loader.js:444:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:484:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:818:27)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/root/invite-manager-bot/bin/framework/RequestHandler.js:5:24)
at Module._compile (internal/modules/cjs/loader.js:1015:30) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

My config file: https://hasteb.in/ifuzidoq.json
But build and start scripts are working.

@chaun14
Copy link
Owner

chaun14 commented Nov 12, 2020

Read that:
SideProjectGuys#167 (comment)

@chaun14
Copy link
Owner

chaun14 commented Nov 12, 2020

(and please open a new issue when you have a non linked problem)

@KiwiTerra
Copy link

It's the same error because the shard crash and for fix it, I switch to node v12.16.2

@chaun14
Copy link
Owner

chaun14 commented Nov 12, 2020

It's the same error because the shard crash and for fix it, I switch to node v12.16.2

SideProjectGuys#167 (comment)

This command explain the solution of your problem

@KiwiTerra
Copy link

I know the solution because it's working now for me.. And you haven't to edit this file, just switch to node 12.16.2

@chaun14
Copy link
Owner

chaun14 commented Nov 12, 2020

yes but in some case it's impossible to switch to node 12.16.2

@j-b-hunter
Copy link
Author

j-b-hunter commented Nov 13, 2020

oh I remember, run the npm run build command and then restart the controller

Ran the commands you suggested and the shard still crashes.

do I need to do anything about the ports its opening?

@chaun14
Copy link
Owner

chaun14 commented Nov 13, 2020

Try npm run dev

@chaun14 chaun14 added the selfhost The probem happened while trying to selfhost label Nov 13, 2020
@j-b-hunter
Copy link
Author

cross-env NODE_ENV=dev node scripts/dev-run.js

Debugger listening on ws://127.0.0.1:44444/1341bdae-4a19-4ff6-99f0-3deef7d7f3
For help, see: https://nodejs.org/en/docs/inspector
internal/modules/cjs/loader.js:438
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rest/RequestHandler' is not defined by "exports" in C:\Users\PC\Desktop\invite-manager-bot\node_modules\eris\package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
at resolveExports (internal/modules/cjs/loader.js:432:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (C:\Users\PC\Desktop\invite-manager-bot\bin\framework\RequestHandler.js:5:24)
at Module._compile (internal/modules/cjs/loader.js:1063:30) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

@j-b-hunter
Copy link
Author

node -v
v14.15.0

@j-b-hunter
Copy link
Author

Changed version to 11 and it all works now...

@chaun14
Copy link
Owner

chaun14 commented Nov 14, 2020

Now try to launch using the sharding controller, npm start and .startAll

@chaun14 chaun14 closed this as completed Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working selfhost The probem happened while trying to selfhost
Projects
None yet
Development

No branches or pull requests

3 participants