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
327 stars 224 forks source link

Error #135

Closed finley541 closed 2 years ago

finley541 commented 2 years ago

When I use node . I get this error:

QiMac:REAPER-2.0 quinns$ node . internal/modules/cjs/loader.js:1080 throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath); ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/quinns/REAPER-2.0/node_modules/chalk/source/index.js require() of ES modules is not supported. require() of /Users/quinns/REAPER-2.0/node_modules/chalk/source/index.js from /Users/quinns/REAPER-2.0/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename /Users/quinns/REAPER-2.0/node_modules/chalk/source/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/quinns/REAPER-2.0/node_modules/chalk/package.json.

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1080:13)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/quinns/REAPER-2.0/index.js:2:15)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14) {

code: 'ERR_REQUIRE_ESM' }

Simpleboy353 commented 2 years ago

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

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

finley541 commented 2 years ago

Thank you but I was wondering after I fixed the chalk issue, it started and I got this: Exception: ReferenceError: client is not defined, then it shuts off.

Simpleboy353 commented 2 years ago

Issue already open #131