minecraft-launcher-core-node
minecraft-launcher-core-node copied to clipboard
Module not found: Error: Can't resolve - Error
I'm having a problem when running the project with minecraft-launcher-core-node imports.
I'm using this repository as an initial template: https://github.com/maximegris/angular-electron

But just importing the packages and using a function already appears several errors

Does anyone know how to fix it? or if you have an electron + minecraft-launcher-core-node template ready to start?
I guess these lines of code are in renderer process (browser).
You need to open nodeIntegration for that browser window to use node modules. (All missing modules are node modules)
But I suggest you to put the launch logic in main process.
Update:
After I investigated this ng template... It seems that the ng build system won't be able to require the node modules.
I even cannot use fs here. I suggest you to use react template or vue template.

For vue template, you can try this https://github.com/ci010/electron-vue-next
I guess these lines of code are in renderer process (browser).
You need to open nodeIntegration for that browser window to use node modules. (All missing modules are node modules)
But I suggest you to put the launch logic in main process.
Update:
After I investigated this ng template... It seems that the ng build system won't be able to require the node modules.
I even cannot use
fshere. I suggest you to use react template or vue template.
For vue template, you can try this https://github.com/ci010/electron-vue-next
Thank you very much for your reply, and thanks for the link to the template in vue. Would there be any in React too?
Thank you very much for your reply, and thanks for the link to the template in vue. Would there be any in React too?
That template actually will works with react. Vite use plugin to switch between different frameworks like vue, react, svelte, etc.
You can install react plugin and then use jsx/tsx in it.
I think I will update that tool to make react work later.