Electron Builder: Not allowed to load local resource: app.asar/build/index.html
Solved by adding "files" in package.json
"files": [ "*.js", "build", "node_modules"],
I think your index.html file is not present in your given location. __dirname, '/build/index.html'
I missed this silly point and wasted a lot of time. Angular-cli creates default location for index.html inside a folder in dist.
dist/project-name/index.html
I had the same issue and managed to sort it out using:
path.resolve('index.html')
like this:
const startUrl = path.resolve('index.html');mainWindow.loadURL(startUrl);