user9161077
user9161077

Reputation:

Packaging electron produces blank page with no content

I've built this app using electron: https://github.com/harryingles/FRJumpCalc

However I can't seem to get it package into an exe file - doing this with any of the packaging utilities causes a blank page when I open it.

http://prntscr.com/hutb0j

This is my first Electron project.

EDIT: I installed a module to open the Dev Tools: and was given the following error message when running the app from the exe file when packaged -

Not allowed to load local resource: file:///views/index.html

Upvotes: 1

Views: 5740

Answers (1)

user9161077
user9161077

Reputation:

I fixed this by:

Changing the pathname of the page to __dirname + "build/index.html"

and adding

"files: [ "build", "*.js", "public"]

to my package.json (It is not updated in the github repo if anybody needs it)

Upvotes: 4

Related Questions