link-discord / mineflayer-auto-eat

Auto eat plugin for mineflayer
https://www.npmjs.com/package/mineflayer-auto-eat
MIT License
33 stars 4 forks source link

Module fails to import in node 20.12.2 #71

Closed davidgraves closed 1 month ago

davidgraves commented 1 month ago

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' }