Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ForgeInstaller doesn't work #165

Open
ecustic opened this issue Jun 12, 2020 · 3 comments
Open

ForgeInstaller doesn't work #165

ecustic opened this issue Jun 12, 2020 · 3 comments
Assignees

Comments

@ecustic
Copy link

ecustic commented Jun 12, 2020

const minecraft = path.resolve(__dirname, 'client')
try {
    const res = await ForgeInstaller.install({ version: '31.2.9', mcversion: '1.15.2' }, minecraft)
    console.log(res)
} catch (err) {
    console.log(err)
}
console.log('done')

Running the above just exits the application after ForgeInstaller.install. None of the console.log statements run, and only the following is output in the versions folder in the client:

+ versions
    + 1.15.2-forge-31.2.9
        + 1.15.2-forge-31.2.9.json
        + install_profile.json

Running on Windows 10 (2004), Node 14, with:

"@xmcl/core": "^2.3.1",
"@xmcl/installer": "^2.9.1",

I expect I might be doing something wrong, but I also expect to be able to catch the error and not have the application force quit.

@lukechu10
Copy link
Contributor

You need to run Installer.installDependencies after installing forge. Also note that because you are installing a Minecraft version above 1.13, you need to have java installed. If the java executable is already in your PATH environment variable, you should be fine. Otherwise, you need to specify the java option.

I have no idea why none of the console.log statements are running. Maybe try using NodeJS 12?

@ecustic
Copy link
Author

ecustic commented Jun 12, 2020

I've narrowed it down to being the node version. Running it with 12.0.0 works fine. With node 14.0.0 the process immediately exits when you call ForgeInstaller.install.

@ci010
Copy link
Collaborator

ci010 commented Jun 13, 2020

I've narrowed it down to being the node version. Running it with 12.0.0 works fine. With node 14.0.0 the process immediately exits when you call ForgeInstaller.install.

That is a problem. I'll checkout if node 14 affect the result.

Update: I tried run the test on my local machine with njs14, but it seems the test passed. Does the process exited means the renderer process exit?

@ci010 ci010 self-assigned this Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants