Closed kidzukii closed 1 year ago
i getting this to
node perfectShotBow.js xxxxxxx xxxxxxxxxxx xxx xxxxxx
node:assert:400
throw err;
^
AssertionError [ERR_ASSERTION]: plugin needs to be a function
at EventEmitter.loadPlugin (/root/mineflayer/node_modules/mineflayer/lib/plugin_loader.js:16:12)
at Object.<anonymous> (/root/mineflayer/perfectShotBow.js:10:5)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Fix: const minecraftHawkEye = require('minecrafthawkeye'); bot.loadPlugin(minecraftHawkEye.default)
Hello guys, could you attach the code?
What @Neotastisch says should fix the problem
Hello guys, could you attach the code?
What @Neotastisch says should fix the problem
You can merge my Pull Request, which fixes the readme
@kidzukii if you update the package no need to add .default, in latest version are fixed
The console logs an error: "plugin needs to be a function". Yields error even for code copied from readme.md.