mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Error with executable of electron-builder; cannot find module '@socket.io/component-emitter' #951
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Thokerb on GitHub (Jun 5, 2024).
ElectronNET.CLI Version: 23.6.2.0
.Net 6
Node.JS v18.18.2
electronize build /target win
When building the project with target win as portable and then trying to run it, the following error message is appearing.
There are no errors during building the application.
cannot find module '@socket.io/component-emitter'After inspecting the created app.asar archive, the package is included.
When running
electronize start, then the app is starting without problems.Steps to Reproduce:
electronize build /target wincannot find module '@socket.io/component-emitter'appearsReason:
This is related to the issue https://github.com/electron-userland/electron-builder/issues/8244 . I don't know the exact problem of the new electron-builder, but when switching back to version 24.13.3 of the electron-builder the application can start after building.
Intermediate solution:
Set electron-builder version to 24.13.3 locally
Proposed solution
Set a fixed version of electron-builder in the https://github.com/ElectronNET/Electron.NET/blob/main/src/ElectronNET.CLI/Commands/BuildCommand.cs#L201 to avoid unexpected behaviour in the future.