Error: Application entry file "index.js" in the "\app.asar" does not exist.

2,236 阅读1分钟

Error: Application entry file "index.js" in the "D:\desktop\electron-screen\dist_electron\win-ia32-unpacked\resources\app.asar" does not exist. Seems like a wrong configuration.

INFO  Building app with electron-builder:
  • electron-builder  version=22.11.7 os=10.0.19044
  • description is missed in the package.json  appPackageFile=D:\desktop\electron-screen\dist_electron\bundled\package.json
  • writing effective config  file=dist_electron\builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=ffi-napi@4.0.3, ref-napi@3.0.3, sqlite3@5.0.11 platform=win32 arch=ia32
  • packaging       platform=win32 arch=ia32 electron=17.1.2 appOutDir=dist_electron\win-ia32-unpacked
Error: Application entry file "index.js" in the "D:\desktop\electron-screen\dist_electron\win-ia32-unpacked\resources\app.asar" does not exist. Seems like a wrong configuration.
    at error (D:\desktop\electron-screen\node_modules\app-builder-lib\src\asar\asarFileChecker.ts:7:12)
    at Object.checkFileInArchive (D:\desktop\electron-screen\node_modules\app-builder-lib\src\asar\asarFileChecker.ts:31:11)
    at WinPackager.checkFileInPackage (D:\desktop\electron-screen\node_modules\app-builder-lib\src\platformPackager.ts:489:7)
    at WinPackager.sanityCheckPackage (D:\desktop\electron-screen\node_modules\app-builder-lib\src\platformPackager.ts:537:5)
    at WinPackager.doPack (D:\desktop\electron-screen\node_modules\app-builder-lib\src\platformPackager.ts:298:5)
    at WinPackager.pack (D:\desktop\electron-screen\node_modules\app-builder-lib\src\platformPackager.ts:136:5)

解决方案:

github.com/electron-us…

package.json

    "main": "background.js",