electron-forge / electron-forge-docs

:electron: Mirror for Electron Forge's GitBook documentation
https://electronforge.io
87 stars 150 forks source link

Initialization does not create new directory as the docs say - it initializes in current working directory #201

Open BeatsuDev opened 1 month ago

BeatsuDev commented 1 month ago
npm init electron-app@latest my-app -- --template=<template>

initializes a project in the current working directory.

The very next section however says:

Starting your app

You should now have a directory called my-app with all the files you need for a basic Electron app.

cd my-app
npm start

I'm guessing this is a mistake in the docs and it should say that it initializes the project in the current working directory + omit the cd my-app line in the very next code block.

BeatsuDev commented 1 month ago

Or perhaps I'm doing something wrong? Because npm start doesn't work either... The generated package.json file seems rather empty:

{
  "name": "my-app",
  "module": "index.ts",
  "type": "module",
  "devDependencies": {
    "@types/bun": "latest"
  },
  "peerDependencies": {
    "typescript": "^5.0.0"
  }
}

I tried npx electron . too, but that fails "Error launching app. Unable to find Electron app at C:....\my-app. Cannot find module C:...\my-app"