Pierce01 / MinecraftLauncher-core

Lightweight module that downloads and runs Minecraft using javascript / NodeJS
MIT License
359 stars 82 forks source link

Cannot read property 'classifier' of undefined #58

Closed MuhammadUsmanMithani closed 3 years ago

MuhammadUsmanMithani commented 3 years ago

Hello, I am making a Minecraft Launcher and I am new to MCLC. I was testing MCLC out so I faced this error. This is my code for my MCLC test:

const { Client, Authenticator } = require('minecraft-launcher-core');
const launcher = new Client();

let opts = {
    clientPackage: null,
    //I am authing in offline mode:
    authenticator: Authenticator.getAuth("iammithani"),
    root: "../../../AppData/Roaming/.minecraft",
    version: {
        number: "1.16.4",
        type: "release",
        custom: "Optifine 1.16.4"
    },
    memory: {
        max: "6G",
        min: "4G"
    }
}

launcher.launch(opts);

launcher.on('debug', (e) => console.log(e));
launcher.on('data', (e) => console.log(e));

Please tell me how do I fix this? Please send me the code of how to fix it.

Pierce01 commented 3 years ago

Handled in the Discord. https://discord.com/channels/568550848871923723/568552422247759884/797842820995219516