Closed SonicandTailsCD closed 1 year ago
Did you make sure your dependencies are up to date? You can do so with npm update --depth 9999
I'll check right away!
So, I just ran the command. I'm starting the server to find out if that worked.
Nope! Still crashed.
cc @IceTank, I don't see anything obviously wrong here.
Delete your node_modules
folder, your package-lock.json
and install your dependencies again.
If that does not work, run npm list --prod --depth=1
and provide the output of that command
Alright, thanks! I'll do that right away :)
Okay! I ran npm update
and that didn't work. (It did reinstall the packages tho).
Here's the requested command output:
npm WARN config production Use
--omit=devinstead. sonicbot@1.0.0 /Users/adm/Desktop/Bot ├── chalk@5.2.0 ├─┬ mineflayer-pathfinder@1.10.0 │ ├── minecraft-data@2.221.0 │ ├── prismarine-block@1.16.3 │ ├── prismarine-entity@2.2.0 │ ├── prismarine-item@1.12.1 │ ├── prismarine-nbt@2.2.1 │ ├── prismarine-physics@1.6.0 │ └── vec3@0.1.8 ├─┬ mineflayer@4.8.1 │ ├── minecraft-data@3.30.0 │ ├── minecraft-protocol@1.41.1 │ ├── prismarine-biome@1.3.0 │ ├── prismarine-block@1.16.3 deduped │ ├── prismarine-chat@1.8.0 │ ├── prismarine-chunk@1.33.0 │ ├── prismarine-entity@2.2.0 deduped │ ├── prismarine-item@1.12.1 deduped │ ├── prismarine-nbt@2.2.1 deduped │ ├── prismarine-physics@1.6.0 deduped │ ├── prismarine-recipe@1.3.1 │ ├── prismarine-registry@1.7.0 │ ├── prismarine-windows@2.6.1 │ ├── prismarine-world@3.6.1 │ ├── protodef@1.15.0 │ ├── typed-emitter@1.4.0 │ └── vec3@0.1.8 deduped └─┬ prismarine-viewer@1.24.0 ├── @tweenjs/tween.js@18.6.4 ├── compression@1.7.4 ├── express@4.18.2 ├── minecraft-data@3.30.0 deduped ├── prismarine-block@1.16.3 deduped ├── prismarine-chunk@1.33.0 deduped ├── prismarine-world@3.6.1 deduped ├── socket.io-client@4.6.1 ├── socket.io@4.6.1 ├── three.meshline@1.4.0 ├── three@0.128.0 └── vec3@0.1.8 deduped
npm un mineflayer-pathfinder
npm install mineflayer-pathfinder
This is caused by using an outdated major version of pathfinder.
Hm... let's see
Thanks bud! This worked :)
Versions
Detailed description of a problem
A clear and concise description of what the problem is, with as much context as possible. Well...
TypeError: Cannot read properties of undefined (reading 'blocksByName') at new Movements (/Users/adm/Desktop/Bot/node_modules/mineflayer-pathfinder/lib/movements.js:38:37) at EventEmitter. (/Users/adm/Desktop/Bot/bot.js:18:23)
at Object.onceWrapper (node:events:641:28)
at EventEmitter.emit (node:events:539:35)
at Client. (/Users/adm/Desktop/Bot/node_modules/mineflayer/lib/plugins/health.js:13:11)
at Object.onceWrapper (node:events:642:26)
at Client.emit (node:events:539:35)
at FullPacketParser. (/Users/adm/Desktop/Bot/node_modules/minecraft-protocol/src/client.js:91:12)
at FullPacketParser.emit (node:events:527:28)
at addChunk (/Users/adm/Desktop/Bot/node_modules/protodef/node_modules/readable-stream/lib/_stream_readable.js:279:12)
Node.js v17.9.0
What are you building? A following script What problem are you trying to solve? Running the script
What did you try yet?
Did you try any method from the API? No.. I have no idea how to :( Did you try any example? Yes, I did Any error from those? Yes, the same error.
Your current code
Expected behavior
I expected the bot to join, stay online and when I said "come", the bot would come. Now I would've used command blocks to move the bot and make it follow me, but the server would kick the bot after a while.
Additional context
Add any other context about the problem here. No thanks.