mineflayer: Cant login in microsoft account
- The FAQ doesn’t contain a resolution to my issue
Versions
- mineflayer: ^2.40.1
- server: vanilla/spigot/paper 1.8.8
- node: 14.13.1
Detailed description of a problem
I´ve bought an new Minecraft account, which belongs to an microsoft account. Now I cant login to my minecraft account with
mineflayer.createBot({...}); as usually. It keeps telling me, that a module is could not be found.
So I tried the following :
What did you try yet?
const bot = mineflayer.createBot({
host: "example.net",
port: 25565,
auth: 'microsoft',
username: "email",
password: "password",
});
Here is my package.json :
{
"name": "Bot",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"mineflayer": "^2.40.1"
}
}
Every time I want to start the bot there is this errror:
Error: Cannot find module 'c:\Users\User\Desktop\Bot\node_modules\@xboxreplay\xboxlive-auth\dist\index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:344:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:557:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:911:27)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (c:\Users\Marco\Desktop\adada\node_modules\minecraft-protocol\src\client\microsoftAuth.js:1:22)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32) {
code: 'MODULE_NOT_FOUND',
path: 'c:\\Users\\User\\Desktop\\Bot\\node_modules\\@xboxreplay\\xboxlive-auth\\package.json',
requestPath: `'@xboxreplay/xboxlive-auth'`
I tried to delete the node_module folder and package-lock.json file and reinstall mineflayer:
npm i mineflayer
added 66 packages, and audited 67 packages in 2s
4 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
But it keeps telling the same error.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (11 by maintainers)
What if I told you it was in the readme. Has a big ol button that says discord.
@Kashalls thank you so much!
@brainTrain Here you go: https://discord.gg/xFPPmYEV Link expires in 7 days from now.
Feel free to ask me for help.
@brainTrain you can ask this question on the discord. As for your error specifically, you can ignore it or remove it by omitting the password field in your bot createBot options.