Error [UNLOADED_PIECE] The piece 'CoreReady' does not exist.

I have no idea why prod started throwing this error on restart, cannot reproduce on test
32|Massive-Automation | Error [UNLOADED_PIECE]: The piece 'CoreReady' does not exist.
32|Massive-Automation | at Map.resolve (/root/Massive/Automation/node_modules/@sapphire/pieces/dist/lib/structures/Store.js:152:23)
32|Massive-Automation | at Map.unload (/root/Massive/Automation/node_modules/@sapphire/pieces/dist/lib/structures/Store.js:98:28)
32|Massive-Automation | at CoreEvent.unload (/root/Massive/Automation/node_modules/@sapphire/pieces/dist/lib/structures/Piece.js:87:26)
32|Massive-Automation | at CoreEvent._runOnce (/root/Massive/Automation/node_modules/@sapphire/framework/dist/lib/structures/Listener.js:100:20)
32|Massive-Automation | at processTicksAndRejections (node:internal/process/task_queues:96:5) {
32|Massive-Automation | type: 'UNLOADED_PIECE'
32|Massive-Automation | }
32|Massive-Automation | Error [UNLOADED_PIECE]: The piece 'CoreReady' does not exist.
32|Massive-Automation | at Map.resolve (/root/Massive/Automation/node_modules/@sapphire/pieces/dist/lib/structures/Store.js:152:23)
32|Massive-Automation | at Map.unload (/root/Massive/Automation/node_modules/@sapphire/pieces/dist/lib/structures/Store.js:98:28)
32|Massive-Automation | at CoreEvent.unload (/root/Massive/Automation/node_modules/@sapphire/pieces/dist/lib/structures/Piece.js:87:26)
32|Massive-Automation | at CoreEvent._runOnce (/root/Massive/Automation/node_modules/@sapphire/framework/dist/lib/structures/Listener.js:100:20)
32|Massive-Automation | at processTicksAndRejections (node:internal/process/task_queues:96:5) {
32|Massive-Automation | type: 'UNLOADED_PIECE'
32|Massive-Automation | }
Solution:
I moved my client.login to a different file and forgot to re-upload the file I removed the old call from, so it was getting called twice. Sorry to bother
Jump to solution
17 Replies
Acier
AcierOP2y ago
Anyone know anything about this?
Spinel
Spinel2y ago
Tag suggestion for @Acier: - Did you use a folder of the examples repository or did you use the CLI to generate your bot? - What's your file/folder structure? - What's your "main" property in package.json - Are you using TypeScript? And if so, how are you compiling and running your code? - Are you using the version 2 or version 3 of @sapphire/framework? - In case you are using version 3 of @sapphire/framework, and your problem related to message commands, did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
Favna
Favna2y ago
You seem to have done some kind of partial reload without properly updating your dependencies because the compiled version of https://github.com/sapphiredev/framework/blob/main/src/listeners/CoreReady.ts cannot be found
GitHub
framework/CoreReady.ts at main · sapphiredev/framework
Discord bot framework built on top of discord.js for advanced and amazing bots. - framework/CoreReady.ts at main · sapphiredev/framework
24
242y ago
Maybe nuke the lockfile along with node_modules and try reinstalling.
Favna
Favna2y ago
this do a full restart of the process afterwards ofc
Solution
Acier
Acier2y ago
I moved my client.login to a different file and forgot to re-upload the file I removed the old call from, so it was getting called twice. Sorry to bother
Krish
Krish2y ago
Can we make this message posted for every post on creation?
24
242y ago
that would be weird considering it should be common sense :P But sometimes people reply with that info, other times the problem isn't sapphire related (see djs den) I'm not sure if AOF can respond differently per channel..
Krish
Krish2y ago
I mean only for this forum time to open a new issue actually
24
242y ago
you can leave it in #suggestions fyi if you want to suggest it seriously
Favna
Favna2y ago
Technically yes but not with spinel. It's an HTT only bot. Doesn't receive forum creation thread events. AOF?
Krish
Krish2y ago
Answer overflow And I was taking about achieving it with AOF so this suggestion will go to AOF's server instead
Favna
Favna2y ago
Never heard anyone abbreviate it
Krish
Krish2y ago
24 pioneered it
Favna
Favna2y ago
Anyway I can just ping @Rhys TL;DR: a message to automatically send when a forum channel is created alongside the current one about the consent. I.e. https://discord.com/channels/737141877803057244/1056607021790666763/1056609564054786138 It's a bad one tbh. If anything it would be AO, following SO being short for StackOverflow. @24
Rhys
Rhys2y ago
Thanks for the ping, I’ll add that to the backlog - I think it’d be great to prompt users to improve their question with images, code snippets, installed packages etc while they wait for a response Also happy holidays!
Favna
Favna2y ago
Same to you man
Want results from more Discord servers?
Add your server