Open Johnrobmiller opened 1 month ago
Hi @Johnrobmiller, I can't seem to reproduce on my side. Can you give me the output from your command and tell me what npm version you're using?
This is the expected output:
♥ 08:55 npm init electron-app@latest my-new-app -- --template=webpack-typescript
✔ Locating custom template: "webpack-typescript"
✔ Initializing directory
✔ Preparing template
✔ Initializing template
✔ Installing template dependencies
Having this same issue, template is not installed with node22 (22.4.1), but correctly installed with node16 (v16.20.2), node18 and node20. OS is windows 10.
Below is terminal output for successful project scaffolding.
> npm init electron-app@latest 02-webpack-typescript -- --template=webpack-typescript
Need to install the following packages:
create-electron-app@7.4.0
Ok to proceed? (y) y
✔ Locating custom template: "webpack-typescript"
✔ Initializing directory
✔ Preparing template
✔ Initializing template
❯ Installing template dependencies
✔ Installing production dependencies
✔ Installing development dependencies
❯ Finalizing dependencies
⠋ Installing common dependencies
› yarn install --dev electron-squirrel-startup
◼ Skip linking forge dependencies
Thanks for the additional context @walruskhan. I just tried myself on Node.js v22.5.1 and npm 10.8.2 and was unable to reproduce the bug still.
One more avenue to explore is that I'm currently running a macOS device, while both reports so far seem to be on Windows. I'll take a closer look on my Windows machine tomorrow.
I had this issue when running this command:
npm init electron-app@latest my-new-app -- --template=vite-typescript
I was able to fix it by running this command instead:
npx create-electron-app my-new-app -- --template=vite-typescript
I am using Windows 11, PowerShell, Node 20.16.0, and npm 10.8.2. It does not appear that the command line args given to npm init
are passed along to create-electron-app
to use. Here is a full log for reference:
PS D:\test> npm init electron-app@latest test -- --template=vite-typescript
> npx
> create-electron-app test
✔ Locating custom template: "base"
✔ Initializing directory
✔ Preparing template
✔ Initializing template
✔ Installing template dependencies
Edit: I tested the same command on a Linux workstation with the same versions of Node and NPM and it works as expected. So I can confirm this is a Windows only issue.
Pre-flight checklist
Electron Forge version
recent
Electron version
recent
Operating system
Windows 11
Last known working Electron Forge version
?
Expected behavior
All templates are broken for me. I tried this command found here
npm init electron-app@latest my-new-app -- --template=webpack-typescript
...as well as all others similar to this. The result is that typescript is not installed. The template is ignored.
This is what I see in my directory:![image](https://github.com/user-attachments/assets/a5f50faa-c8ec-4a0f-911d-b744ca57706b)
Actual behavior
see above
Steps to reproduce
see above
Additional information
No response