Open dyllandry opened 1 year ago
Can't seem to repro on my end on NPM 8:
> npm init electron-app@latest my-app -- --template=webpack-typescript --force
✔ Locating custom template: "webpack-typescript"
✔ Initializing directory
› ⚠ The specified path "/Users/erick.zhao/Developer/dump/my-app" is not empty. "force" was set to true, so proceeding to initialize. Files may be overwritten
✔ Preparing template
✔ Initializing template
✔ Installing template dependencies
> cat my-app/package.json | grep plugin-webpack
"@electron-forge/plugin-webpack": "^6.0.4",
Seems I can repro reliably on NPM 6, though. I think something changed with npm init
between major versions. We should probably change the docs so that it can hopefully work with all NPM cersions.
Yeah it worked for me as well when I swapped to node v16.19.0 using nvm which uses npm 8.19.3
Thanks for looking into this. I do think something in the docs would help, or some way of running thats npm version agnostic if possible.
I'm using Node v20.11.1 and also found that this kind of command was making the base template.
I used this instead:
npx create-electron-app@latest my-app --template=vite-typescript
I just read the getting started page and tried out the command for using the typescript template but it just ended up creating a project using the base template.
This command from the getting started page just creates a project with the base template:
Instead of that, this works, without the double dashes prior to the options:
I'm using node v14.19.0 and npm 6.14.16 and my shell is zsh 5.8 (x86_64-apple-darwin21.0)