Skip to content

fix(core): convert absolute file path to file URL in locateElectronExecutable#4214

Merged
erikian merged 1 commit intonextfrom
fix/import-absolute-path
Apr 15, 2026
Merged

fix(core): convert absolute file path to file URL in locateElectronExecutable#4214
erikian merged 1 commit intonextfrom
fix/import-absolute-path

Conversation

@erikian
Copy link
Copy Markdown
Member

@erikian erikian commented Apr 15, 2026

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

This prevents the following error when running electron-forge start on Windows:

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

Testing

  • on a Windows machine, run yarn spawn-verdaccio to start the Verdaccio local registry
  • create a project using the local version of create-electron-app with $env:NPM_CONFIG_REGISTRY="http://127.0.0.1:4873"; node ./packages/external/create-electron-app/dist/create-electron-app.js vite-esm-test --template=vite-typescript
  • start the project with cd vite-esm-test ; yarn electron-forge start; it should launch the app correctly (on the next branch, I get the error mentioned above instead)
  • there should be no changes on macOS or Linux

…xecutable`

This prevents the following error when running `electron-forge start` on Windows:

```
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
```
@erikian erikian requested a review from a team as a code owner April 15, 2026 14:44
@github-actions github-actions Bot added the next label Apr 15, 2026
@erikian erikian merged commit 1d44dfc into next Apr 15, 2026
13 checks passed
@erikian erikian deleted the fix/import-absolute-path branch April 15, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants