Closed CrazyGladiator closed 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.
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'