You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I installed the last version of discord-backup (v3.3.2) but when I start my bot, I got this error:
Instead change the require of C:\Users\Merlode\Documents\GitHub\ServerEditorBot\node_modules\node-fetch\src\index.js in C:\Users\Merlode\Documents\GitHub\ServerEditorBot\node_modules\discord-backup\lib\index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (C:\Users\Merlode\Documents\GitHub\ServerEditorBot\node_modules\discord-backup\lib\index.js:5:22)
at Object.<anonymous> (C:\Users\Merlode\Documents\GitHub\ServerEditorBot\events\interactionCreate.js:2:16)
at C:\Users\Merlode\Documents\GitHub\ServerEditorBot\index.js:56:23
at Array.forEach (<anonymous>)
at C:\Users\Merlode\Documents\GitHub\ServerEditorBot\index.js:55:11
at FSReqCallback.oncomplete (node:fs:196:23) {
code: 'ERR_REQUIRE_ESM'
}```
When I remove the `require("discord-backup")` declarations, the bot start well.
My Node version is `v16.17.0`
*The error is linked to `const node_fetch_1 = require("node-fetch");`*
How can I fix it ?
Thank you very much for the help !
The text was updated successfully, but these errors were encountered:
Hello,
I installed the last version of
discord-backup
(v3.3.2) but when I start my bot, I got this error:The text was updated successfully, but these errors were encountered: