Closed Nishant1500 closed 3 years ago
By using empty overrides you are essentially giving MCLC nothing to work with. Please read the documentation and follow the provided example.
Adding on, don't use overrides. Just follow the standard example.
Ok I used the standard example still its coming unexpected token ... Can You Help Me Please : D
Feel free to post what you have.
const { Client, Authenticator } = require('minecraft-launcher-core');
const launcher = new Client();
const account = require('./account.json);
let opts = {
clientPackage: null,
// For production launchers, I recommend not passing
// the getAuth function through the authorization field and instead
// handling authentication outside before you initialize
// MCLC so you can handle auth based errors and validation!
authorization: Authenticator.getAuth(account.username),
root: "./minecraft",
version: {
number: "1.16.1",
type: "release"
},
memory: {
max: 1024",
min: "1024"
}
}
launcher.launch(opts);
launcher.on('debug', (e) => console.log(e));
launcher.on('data', (e) => console.log(e));
I am getting this :/
Uncaught SyntaxError: Unexpected token ...
at createScript (vm.js:74)
at Object.runInThisContext (vm.js:116)
at Module._compile (module.js:533)
at Object.Module._extensions..js (module.js:580)
at Module.load (module.js:503)
at tryModuleLoad (module.js:466)
at Function.Module._load (module.js:458)
at Module.require (module.js:513)
at require (internal/module.js:11)
at Object.<anonymous> (C:\Users\Nishant\Downloads\Electron App\node_modules\minecraft-launcher-core\index.js:2)
const account = require('./account.json);
Is not proper sytanx, you're missing another '
.
Ok I did it but still getting it :/ The problem is in ...this.options.overide in launcher.js
const account = require('./account.json);
Is not proper sytanx, you're missing another
'
.
ye but actually in our launcher the syntax is correcty(me and @Nishant1500 are making the launcher together), and according to him it still doesnt work, but im getting a diff output
Your stack trace does not reflect this. It would be easier to continue our convo in the Discord, not sure why you switched over to here
const account = require('./account.json);
Is not proper sytanx, you're missing another
'
.ye but actually in our launcher the syntax is correcty(me and @Nishant1500 are making the launcher together), and according to him it still doesnt work, but im getting a diff output
Umm can u show me ur error ??
see discord
My all things work perfectly expect the launcher syntax error
Fixed myself :> It Will Be Great If You Delete This Issue :)
This IS My Code Down Is The Error Code