Hello, I am trying to run the code from the file "basic.js" which is located at the examples folder, and I run into this error. I also tried taking parts of the basic.js to put into my own code and I run into the same problem. Whenever the "bot.loadPlugin(pathfinder)" runs, this error occurs. When you have the time, please check this out:
TypeError: Cannot read properties of undefined (reading 'on')
at new CacheSyncWorld (C:\Users\Owner\Downloads\autogrinder\node_modules\@nxg-org\mineflayer-pathfinder\dist\mineflayer-specific\world\cacheWorld.js:241:24)
at new ThePathfinder (C:\Users\Owner\Downloads\autogrinder\node_modules\@nxg-org\mineflayer-pathfinder\dist\ThePathfinder.js:112:73)
at C:\Users\Owner\Downloads\autogrinder\node_modules\@nxg-org\mineflayer-pathfinder\dist\index.js:44:26
at C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\plugin_loader.js:41:7
at Array.forEach ()
at injectPlugins (C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\plugin_loader.js:40:16)
at EventEmitter.onInjectAllowed (C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\plugin_loader.js:12:5)
at Object.onceWrapper (node:events:633:28)
at EventEmitter.emit (node:events:531:35)
at Timeout._onTimeout (C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\loader.js:128:26)
Hello, I am trying to run the code from the file "basic.js" which is located at the examples folder, and I run into this error. I also tried taking parts of the basic.js to put into my own code and I run into the same problem. Whenever the "bot.loadPlugin(pathfinder)" runs, this error occurs. When you have the time, please check this out:
C:\Users\Owner\Downloads\autogrinder\node_modules\@nxg-org\mineflayer-pathfinder\dist\mineflayer-specific\world\cacheWorld.js:241 referenceWorld.on('blockUpdate', (oldBlock, newBlock) => { ^
TypeError: Cannot read properties of undefined (reading 'on') at new CacheSyncWorld (C:\Users\Owner\Downloads\autogrinder\node_modules\@nxg-org\mineflayer-pathfinder\dist\mineflayer-specific\world\cacheWorld.js:241:24) at new ThePathfinder (C:\Users\Owner\Downloads\autogrinder\node_modules\@nxg-org\mineflayer-pathfinder\dist\ThePathfinder.js:112:73) at C:\Users\Owner\Downloads\autogrinder\node_modules\@nxg-org\mineflayer-pathfinder\dist\index.js:44:26 at C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\plugin_loader.js:41:7 at Array.forEach ()
at injectPlugins (C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\plugin_loader.js:40:16)
at EventEmitter.onInjectAllowed (C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\plugin_loader.js:12:5)
at Object.onceWrapper (node:events:633:28)
at EventEmitter.emit (node:events:531:35)
at Timeout._onTimeout (C:\Users\Owner\Downloads\autogrinder\node_modules\mineflayer\lib\loader.js:128:26)
Node.js v20.18.0