-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
When building the project from the master branch I ran into the following issue:
A JavaScript error occurred in the main process
Uncaught Exception:
Error [ERR_REQUIRE_ESM]: require() of ES Module /tmp/.mount_BandcaAeC6lV/resources/app.asar/node_modules/is-online/index.js from /tmp/.mount_BandcaAeC6lV/resources/app.asar/src/main.js not supported.
Instead change the require of index.js in /tmp/.mount_BandcaAeC6lV/resources/app.asar/src/main.js to a dynamic import() which is available in all CommonJS modules.
Steps to reproduce:
- clone repo
npm installnpm startOR build and launch app image
This is because is-online is an ESM only package since version 9.
I found two possible fixes:
- Downgrade is-online to 8.5.1 (last CJS compatible version)
- Replace is-online with the esm2cjs version
I think this broke in this PR: https://github.com/themagiulio/bandcamp-desktop/pull/49/files , which upgraded is-online from 8.x to 10.0.
This was merged a few years ago though, so no idea why it still seems to work from most people.
I tested using node 16, 20 and 24 on Linux.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels