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

feat(cli): show template sources when initializing #3895

Merged
merged 1 commit into from
Mar 19, 2025
Merged

Conversation

erickzhao
Copy link
Member

@erickzhao erickzhao commented Mar 19, 2025

A common issue for Electron Forge's init command is that our internal template search logic prioritizes globally installed templates over locally installed ones.

In practice, this means that if you installed npm install -g create-electron-app at some point (we used to recommend that in our docs a long time ago), you'll run into a bug where init fails because it tries to fetch the global module installed with an incompatible Forge version.

ref #3874

This PR addresses the issue by suffixing (local module) or (global module) to the end of the file and resolving the actual template module name.

✔ Resolving package manager: yarn
✔ Resolving template: webpack-typescript
  › Using @electron-forge/template-webpack-typescript (local module)

@erickzhao erickzhao requested a review from a team as a code owner March 19, 2025 05:13
@erickzhao erickzhao added this pull request to the merge queue Mar 19, 2025
Merged via the queue into main with commit d3900ee Mar 19, 2025
12 checks passed
@erickzhao erickzhao deleted the template-source branch March 19, 2025 18:57
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

Successfully merging this pull request may close these issues.

2 participants