Application entry file "electron/bundled/background.js" in the "....app.asar" does not exist
See original GitHub issueDescribe the bug Looks like there is some misconfiguration happening with electron-builder
To Reproduce Run the following:
git clone git://github.com/osapps/dotsync
cd dotsync
yarn
cd packages/app
npm run electron:build
Expected behavior Building should work
Screenshots
INFO Building app with electron-builder:
• electron-builder version=20.38.5
• writing effective config file=electron/builder-effective-config.yaml
• no native production dependencies
• packaging platform=darwin arch=x64 electron=3.1.3 appOutDir=electron/mac
• default Electron icon is used reason=application icon is not set
ERROR Error: Application entry file "electron/bundled/background.js" in the "/Users/pksunkara/Coding/osapps/dotsync/packages/app/electron/mac/Dotsync.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.
Error: Application entry file "electron/bundled/background.js" in the "/Users/pksunkara/Coding/osapps/dotsync/packages/app/electron/mac/Dotsync.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.
at error (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/out/asar/asarFileChecker.js:44:14)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:30:4
From previous event:
at _checkFileInArchive (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:36:17)
at checkFileInArchive (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/out/asar/asarFileChecker.js:40:30)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:409:13
at Generator.next (<anonymous>)
From previous event:
at MacPackager.checkFileInPackage (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:406:110)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:460:16
at Generator.next (<anonymous>)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/polyfills.js:285:20
at FSReqWrap.oncomplete (fs.js:159:5)
From previous event:
at MacPackager.sanityCheckPackage (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:446:92)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:249:16
at Generator.next (<anonymous>)
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
at MacPackager.doPack (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:167:165)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/macPackager.ts:88:63
at Generator.next (<anonymous>)
From previous event:
at MacPackager.pack (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/macPackager.ts:80:95)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:430:24
at Generator.next (<anonymous>)
at xfs.stat (/Users/pksunkara/Coding/osapps/dotsync/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/polyfills.js:285:20
at FSReqWrap.oncomplete (fs.js:159:5)
From previous event:
at Packager.doBuild (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:396:24)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:366:57
at Generator.next (<anonymous>)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/graceful-fs.js:111:16
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqWrap.oncomplete (fs.js:145:20)
From previous event:
at Packager._build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:335:133)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:331:23
at Generator.next (<anonymous>)
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
at Packager.build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:288:14)
at build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/index.ts:59:28)
at Object.build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/electron-builder/src/builder.ts:227:10)
at buildApp (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/index.js:176:14)
at bundle.run (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/index.js:158:15)
at finalCallback (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:220:39)
at hooks.done.callAsync.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:269:14)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
at AsyncSeriesHook.lazyCompileHook (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/Hook.js:154:20)
at emitRecords.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:267:22)
at Compiler.emitRecords (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:449:39)
at emitAssets.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:261:10)
at hooks.afterEmit.callAsync.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:435:14)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/Hook.js:154:20)
at asyncLib.forEachLimit.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:432:27)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/neo-async/async.js:2813:7
at done (/Users/pksunkara/Coding/osapps/dotsync/node_modules/neo-async/async.js:3521:9)
at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqWrap.oncomplete (fs.js:145:20)
Environment (please complete the following information):
- OS and version: MacOS 10.13.1
- node version: 10.6.0
- npm version: 6.7.0
- yarn version (if used): 1.12.3
- vue-cli-plugin-electron-builder version : 1.0.0-rc.11
- electron version: 3.1.3
- other vue plugins used:
- custom config for vcp-electron-builder:
- (if possible) link to your repo: https://github.com/osapps/dotsync
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:33 (11 by maintainers)
Top Results From Across the Web
Application entry file "build/electron.js" in the "<path>/dist/mac ...
Error: Application entry file "build/electron.js" in the "<path>/dist/mac/<app-name>/Contents/Resources/app.asar" does not exist. #2404.
Read more >node.js - Application entry file does not exist in Electron Builder
Application entry file "main. js" in the "[path-to-project]/dist/mac/myapp. app/Contents/Resources/app. asar" does not exist.
Read more >Fixing "Error - Application entry file `dist/src/main` ... does not ...
I got this error when I was trying to build an electron app with electron-builder: Application ent...
Read more >Packaging and distributing Electron applications using ...
In this lesson, we are going to create distribution files for an Electron application such as .dmg or .pkg for macOS or .msi...
Read more >Application Packaging | Electron
To distribute your app with Electron, you need to package and rebrand it. To do this, you can either use specialized tooling or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually valid value for that field is “./src/background.js”, thats why for example “electron .” command doesnt work (“Unable to find Electron app”)
The other part of the problem is that LTS version of Node doesnt work with ES6 without transpiling, but I beleive it will in couple of months, after that we will be able to quickly run app (~1s instead of ~20s with electron:serve), but the command will be long and a bit ugly “electron src/backgound.js” because of incorrect main in package.js
BTW, the names of main files are confusing because most Electron examples using main.js (its background.js here) and renderer.js (its main.js here)
Error fixed after changing the
package.json
: fromto