Simpleboy353 / REAPER-2.0

A multi-purpose discord bot made using Discord.js V14. Includes Logging, Welcomer, Slash Commands, Menu based Help Command and so much more!
GNU General Public License v3.0
329 stars 225 forks source link

const chalk = require("chalk"); #144

Closed CrazyGladiator closed 2 years ago

CrazyGladiator commented 2 years ago

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/container/node_modules/chalk/source/index.js from /home/container/index.js not supported. Instead change the require of /home/container/node_modules/chalk/source/index.js in /home/container/index.js to a dynamic import() which is available in all CommonJS modules. at Object. (/home/container/index.js:2:15) { code: 'ERR_REQUIRE_ESM'

Simpleboy353 commented 2 years ago

How to fix Error [ERR_REQUIRE_ESM]: require() for the package chalk ?

Uninstall the package chalk

Do npm install chalk@4.1.0

^^ This should probably fix the error and your bot should start to work normally.