Versions
- mineflayer: most recent
- server: localhost / lan, any regular server aswell
- node: 23.9.0
Detailed description of a problem
tried using the boiler plate provided by the wiki, but whenever my project starts i'm hit with this:
TypeError: Cannot read properties of null (reading 'version')
What did you try yet?
tried using other people's boilerplate, my own, etc. changed versions, ports
Did you try any method from the API?
Did you try any example? Any error from those?
the first example on the github
Your current code
const mineflayer = require("mineflayer");
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: 34835, // 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
});
bot.on("chat", (username, message) => {
if (username === bot.username) return;
bot.chat(message);
});
// Log errors and kick reasons:
bot.on("kicked", console.log);
bot.on("error", console.log);
Expected behavior
A clear and concise description of what you expected to happen.
bot to join the server, nothing else
Additional context
Add any other context about the problem here.
using nodejs
log.txt
Versions
Detailed description of a problem
tried using the boiler plate provided by the wiki, but whenever my project starts i'm hit with this:
What did you try yet?
tried using other people's boilerplate, my own, etc. changed versions, ports
Did you try any method from the API?
Did you try any example? Any error from those?
the first example on the github
Your current code
Expected behavior
A clear and concise description of what you expected to happen.
bot to join the server, nothing else
Additional context
Add any other context about the problem here.
using nodejs
log.txt