-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Description
Operating System:
Mac OS Ventura 13.7.3 (22H417)
I'm trying to start a new project from template, following instructions on https://www.electronforge.io/
- Open terminal
- cd to a directory (e.g.
cd documents
>cd code
) npx create-electron-app@latest myprojectname --template=vite-typescript
cd myprojectname
code .
- In VS Code, open integrated terminal
npm install
npm run make
RESULT: sh: electron-forge: command not found
I try:
npm install electron-forge -D
- npm run make
RESULT:
✔ Checking your system
✖ Resolving Forge Config
Electron forge was terminated:
You must depend on "electron-prebuilt-compile" in your devDependencies
At this point, my package looks like this:
{
"name": "koboldtracker",
"productName": "koboldtracker",
"version": "1.0.0",
"description": "My Electron application description",
"main": ".vite/build/main.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts,.tsx ."
},
"keywords": [],
"author": {
"name": "HedgeWizardly",
"email": "[email protected]"
},
"license": "MIT",
"devDependencies": {
"@electron-forge/plugin-vite": "^7.8.1",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"electron-forge": "^5.2.4",
"eslint": "^8.57.1",
"eslint-plugin-import": "^2.32.0",
"ts-node": "^10.9.2",
"typescript": "~4.5.4",
"vite": "^5.4.19"
}
}
Following the advice in electron/forge#2024 (comment) I tried npm uninstall -g electron-forge
followed again by npm run make
and hit the same issue.
Next I tried npm install electron-prebuilt-compile -D
which adds "electron-prebuilt-compile": "^8.2.0",
to my package file.
npm run make
yields:
✖ Resolving Forge Config
Electron forge was terminated:
You must depend on an EXACT version of "electron-prebuilt-compile" not a range (got "^8.2.0")```
I remove the `^` from the package definition and re-run `npm install` and try `npm run make` again afterwards. This yields:
```✔ Checking your system
✖ Resolving Forge Config
Electron forge was terminated:
You must depend on "electron-prebuilt-compile" in your devDependencies```
Please help..! I'm only a hobbyist programmer so I might be missing something potentially obvious, but to have already hit so many barriers just trying to follow the getting started guide must be a hindrance to other people too, unless it's something SPECIFICALLY off with my system..?
Metadata
Metadata
Assignees
Labels
No labels