exil0867 / MemerBot

A Discord bot that generates GIF memes
MIT License
9 stars 3 forks source link

dynamic import() on caption.js and meme.js #21

Open ghost opened 2 years ago

ghost commented 2 years ago

Couldn't load command caption.js: Error [ERR_REQUIRE_ESM]: require() of ES Module [C:\Users#####\node_modules\file-type\index.js]() from [C:\Users#####\Desktop\MemerBot-master\commands\caption.js]() not supported. Instead change the require of index.js in [C:\Users#####\Desktop\MemerBot-master\commands\caption.js]() to a dynamic import() which is available in all CommonJS modules. index.js:29 Couldn't load command meme.js: Error [ERR_REQUIRE_ESM]: require() of ES Module [C:\Users#####\node_modules\file-type\index.js]() from [C:\Users#####\Desktop\MemerBot-master\commands\meme.js]() not supported. Instead change the require of index.js in [C:\Users#####\Desktop\MemerBot-master\commands\meme.js]() to a dynamic import() which is available in all CommonJS modules.

i know like nothing about javascript but ive gotten through most problems except this

exil0867 commented 2 years ago

What's the output of node -v? Try running the Bot under an older version of Node.js. If i remember correctly i used Node.js v16 LTS to develop this bot.