Using your example code exactly cut-and-pasted from your documentation:
Error [ERR_REQUIRE_ESM]: require() of ES Module ./node_modules/mineflayer-auto-eat/dist/index.js from ./ae.js not supported.
Instead change the require of index.js in ./ae.js to a dynamic import() which is available in all CommonJS modules.
at Object. (./newbot/ae.js:2:17) {
code: 'ERR_REQUIRE_ESM'
}
Using your example code exactly cut-and-pasted from your documentation:
Error [ERR_REQUIRE_ESM]: require() of ES Module ./node_modules/mineflayer-auto-eat/dist/index.js from ./ae.js not supported. Instead change the require of index.js in ./ae.js to a dynamic import() which is available in all CommonJS modules. at Object. (./newbot/ae.js:2:17) {
code: 'ERR_REQUIRE_ESM'
}