You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having trouble trying to get a basic project setup and running into errors. The errors are:
PartialReadError: Read error for undefined : Missing characters in string, found size is 13 expected size was 21
at new ExtendableError (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\utils.js:63:13)
at new PartialReadError (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\utils.js:70:5)
at Object.string (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:100:15)
at eval (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:1134:77)
at eval (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:1163:13)
at Object.entityMetadataEntry (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:1185:9)
at Object.entityMetadata (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:1193:47)
at Object.packet_entity_metadata (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:3388:73)
at eval (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:4194:70)
at packet (eval at compile (C:\Users\Kyle\Desktop\minecraft-bot\node_modules\protodef\src\compiler.js:262:12), <anonymous>:4229:9)
I've tried creating a new project with nothing but index.ts and no other dependencies and still get the error, I've tried re-installing mineflayer and protodef. I've tried using .js instead of .ts for index.xx.
Here is my index.ts.
require('dotenv').config();
const mineflayer = require('mineflayer');
// Set up the realms client with your Minecraft account credentials
const email = process.env.MINECRAFT_EMAIL;
const password = process.env.MINECRAFT_PASSWORD;
// Localhost Bot
const bot = mineflayer.createBot({
host: 'localhost', // minecraft server ip
username: 'Bot', // username to join as if auth is `offline`, else a unique identifier for this account. Switch if you want to change accounts
auth: 'offline', // for offline mode servers, you can set this to 'offline'
port: 25565, // set if you need a port that isn't 25565
// version: false, // only set if you need a specific version or snapshot (ie: "1.8.9" or "1.16.5"), otherwise it's set automatically
// password: '12345678' // set if you want to use password-based auth (may be unreliable). If specified, the `username` must be an email
});
Running on Minecraft version 1.21 with Windows version 11. My package.json is:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Having trouble trying to get a basic project setup and running into errors. The errors are:
I've tried creating a new project with nothing but index.ts and no other dependencies and still get the error, I've tried re-installing mineflayer and protodef. I've tried using .js instead of .ts for index.xx.
Here is my index.ts.
Running on Minecraft version 1.21 with Windows version 11. My package.json is:
Any ideas what I could be doing wrong here? The bot is able to join but getting these errors.
Beta Was this translation helpful? Give feedback.
All reactions