Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Promise Rejection - TypeError : Cannot read property "appId" of undefined #31

Closed
inkhsutesou opened this issue Dec 14, 2019 · 9 comments · Fixed by #32
Closed

Unhandled Promise Rejection - TypeError : Cannot read property "appId" of undefined #31

inkhsutesou opened this issue Dec 14, 2019 · 9 comments · Fixed by #32

Comments

@inkhsutesou
Copy link

@inkhsutesou inkhsutesou commented Dec 14, 2019

Using this boilerplate, if I attempt to generate a package for Windows, the process fails since the executable cannot access the app id in package.json.
https://github.com/sindresorhus/electron-boilerplate/blob/master/index.js#L17

@sindresorhus

This comment has been minimized.

Copy link
Owner

@sindresorhus sindresorhus commented Dec 14, 2019

@juliangruber

This comment has been minimized.

Copy link
Contributor

@juliangruber juliangruber commented Dec 15, 2019

This error means that you don't have a "build" property in your package.json. If the package.json wasn't available, the require('./package.json') would have thrown.

@lomocc

This comment has been minimized.

Copy link

@lomocc lomocc commented Dec 16, 2019

"build" property in package.json will be removed after electron-builder

@inkhsutesou

This comment has been minimized.

Copy link
Author

@inkhsutesou inkhsutesou commented Dec 16, 2019

@juliangruber Yes, it has the build property
@lomocc Electron-builder doesn't ship with build does the rest of package.json make it ?

Otherwise, out of the box, this boilerplate ships a failing package in Windows

@juliangruber

This comment has been minimized.

Copy link
Contributor

@juliangruber juliangruber commented Dec 17, 2019

I'm sorry about this, I hadn't tested it on Windows. If indeed electron-builder changes the package.json as part of the build process, it's best we revert 42644c3.

@igghera

This comment has been minimized.

Copy link

@igghera igghera commented Jan 4, 2020

Is there a quick workaround, like downgrading to an older version? I need this working tomorrow and I can't build :(

@inkhsutesou

This comment has been minimized.

Copy link
Author

@inkhsutesou inkhsutesou commented Jan 4, 2020

@igghera

app.setAppUserModelId( `Place User Model Id directly here` ); // or not, the application should still work if you never set a User Model Id
// app.setAppUserModelId( packageJson.build.appId );
@igghera

This comment has been minimized.

Copy link

@igghera igghera commented Jan 4, 2020

@inkhsutesou thanks mate, you saved my life :)
and thanks to the maintainers of this repo, it's the best

@juliangruber

This comment has been minimized.

Copy link
Contributor

@juliangruber juliangruber commented Jan 7, 2020

PR up: #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.