Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

MarshallOfSound
Copy link
Member

We were falling back to the "best guess" behavior for the forge.config.js scenario, we can do better than best guess and infer a forge project based on a forge dependency

We were falling back to the "best guess" behavior for the forge.config.js scenario, we can do better than best guess and infer a forge project based on a forge dependency
@VerteDinde VerteDinde merged commit b5d0587 into main Oct 31, 2022
@VerteDinde VerteDinde deleted the MarshallOfSound-patch-2 branch October 31, 2022 16:48
1j01 added a commit to 1j01/tracky-mouse that referenced this pull request Apr 19, 2024
Removing `config.forge` from `package.json` made it give an error:

    An unhandled rejection has occurred inside Forge:
    Error: packageJSON.main must be set to a valid entry point for your Electron app

The error did not say what `package.json` file it was looking it, but
the issue was that it was finding the wrong `package.json` due to
guessing logic in `resolve-dir.ts` that only looked for the
`config.forge` keys in `package.json` when determining what
`package.json` to use, ignoring `forge.config.js`, and defaulting to
the outermost `package.json`, not the innermost one.

Update Electron Forge to v6.0.0-beta.71 which includes a change
which remedies the problem: electron/forge#3023
Now Electron Forge checks also for a dependency on `@electron-forge/cli`
and so finds the correct `package.json` again.

Now Electron Forge can actually use `forge.config.js`, and this fixes
the executable name, the icons in some cases, and other metadata,
as well as the `@electron-forge/publisher-github` plugin, presumably.
1j01 added a commit to 1j01/tracky-mouse that referenced this pull request Apr 20, 2024
Removing `config.forge` from `package.json` first made it give an error:

    An unhandled rejection has occurred inside Forge:
    Error: packageJSON.main must be set to a valid entry point for your Electron app

The error did not say what `package.json` file it was looking at, but
the issue was that it was finding the wrong `package.json` due to
guessing logic in `resolve-dir.ts` that only looked for the
`config.forge` keys in `package.json` when determining what
`package.json` to use, ignoring `forge.config.js`, and defaulting to
the outermost `package.json`, not the innermost one.

Update Electron Forge to v6.0.0-beta.71 which includes a change
which remedies the problem: electron/forge#3023
Now Electron Forge checks also for a dependency on `@electron-forge/cli`
and so finds the correct `package.json` again.

Now Electron Forge can actually use `forge.config.js`, and this fixes
the executable name, the icons in some cases, and other metadata,
as well as the `@electron-forge/publisher-github` plugin, presumably.
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.