When use HMR and edit files It always sends an error, no matter what file is being edited:
9|Wishbot | [ERROR] [HMR-Plugin]: Failed to load pieces from /root/node/Customers/Wishbot/src/commands/collection.js. Error [EMPTY_MODULE]: A compatible class export was not found. [/root/node/Customers/Wishbot/src/commands/collection.js]9|Wishbot | at LoaderStrategy.load (/root/node/Customers/Wishbot/node_modules/@sapphire/pieces/dist/lib/strategies/LoaderStrategy.js:92:19)9|Wishbot | at async CommandStore.load (/root/node/Customers/Wishbot/node_modules/@sapphire/pieces/dist/lib/structures/Store.js:89:26)9|Wishbot | at async SlashCommand.reload (/root/node/Customers/Wishbot/node_modules/@sapphire/pieces/dist/lib/structures/Piece.js:94:9)9|Wishbot | at async SlashCommand.reload (/root/node/Customers/Wishbot/node_modules/@sapphire/framework/dist/lib/structures/Command.js:108:5)9|Wishbot | at async /root/node/Customers/Wishbot/node_modules/@sapphire/plugin-hmr/dist/lib/hmr.js:49:139|Wishbot | at async Object.fromAsync (/root/node/Customers/Wishbot/node_modules/@sapphire/result/dist/index.js:615:22)9|Wishbot | at async handlePiecePathUpdate (/root/node/Customers/Wishbot/node_modules/@sapphire/plugin-hmr/dist/lib/hmr.js:47:20) {9|Wishbot | type: 'EMPTY_MODULE',9|Wishbot | path: '/root/node/Customers/Wishbot/src/commands/collection.js'9|Wishbot | }
9|Wishbot | [ERROR] [HMR-Plugin]: Failed to load pieces from /root/node/Customers/Wishbot/src/commands/collection.js. Error [EMPTY_MODULE]: A compatible class export was not found. [/root/node/Customers/Wishbot/src/commands/collection.js]9|Wishbot | at LoaderStrategy.load (/root/node/Customers/Wishbot/node_modules/@sapphire/pieces/dist/lib/strategies/LoaderStrategy.js:92:19)9|Wishbot | at async CommandStore.load (/root/node/Customers/Wishbot/node_modules/@sapphire/pieces/dist/lib/structures/Store.js:89:26)9|Wishbot | at async SlashCommand.reload (/root/node/Customers/Wishbot/node_modules/@sapphire/pieces/dist/lib/structures/Piece.js:94:9)9|Wishbot | at async SlashCommand.reload (/root/node/Customers/Wishbot/node_modules/@sapphire/framework/dist/lib/structures/Command.js:108:5)9|Wishbot | at async /root/node/Customers/Wishbot/node_modules/@sapphire/plugin-hmr/dist/lib/hmr.js:49:139|Wishbot | at async Object.fromAsync (/root/node/Customers/Wishbot/node_modules/@sapphire/result/dist/index.js:615:22)9|Wishbot | at async handlePiecePathUpdate (/root/node/Customers/Wishbot/node_modules/@sapphire/plugin-hmr/dist/lib/hmr.js:47:20) {9|Wishbot | type: 'EMPTY_MODULE',9|Wishbot | path: '/root/node/Customers/Wishbot/src/commands/collection.js'9|Wishbot | }
The command files load fine when the bot starts up and get executed without any problems
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
S-IaF
Sapphire - Imagine a Framework
Sapphire is a next-gen object-oriented Discord.js bot framework.