Error: Application entry file "main.js" in the ".../Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.

See original GitHub issue
  • Version: “electron”: “^2.0.2”, “electron-builder”: “^20.15.1”, “electron-webpack”: “^2.1.2”

    node v10.0.0 yarn 1.6.0 mac sierra 10.13.4

  • Target: mac

I’m following this gist: https://gist.github.com/matthewjberger/6f42452cb1a2253667942d333ff53404

Everything is ok, development is ok, but on yarn dist I get this error:

Error: Application entry file "main.js" in the ".../Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.

I found somewhere a workaround as add "extends": null in build in package.json but I get a compiled file (.app) that open a white page. If I start the electron app created that shows only a white page with the inspector opened I see app.js not found error

My package.json build right now is:

"build": {
      "appId": "com.electron.electron-with-create-react-app",
      "win": {
          "icon": "https://cdn2.iconfinder.com/data/icons/designer-skills/128/react-256.png"
      },
      "directories": {
          "buildResources": "public"
      }
  },

I’ve tried to copy my src/electron-starter.js into main.js (into main project directory) and in src/main.js and into public/main.js as a workaround but the error is still there.

Do you have any hint? Do I have to post something more about my actual project?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:7

github_iconTop GitHub Comments

83reactions
pcichocommented, May 31, 2018

Add “files” field to your package.json in my case “electron-starter.js” is electron entry file

"main": "./src/electron-starter.js",
  "homepage": "./",
  "build": {
    "appId": "oneoften",
    "files": [
      "./build/**/*",
      "./src/electron-starter.js"
    ],
    "dmg": {
      "contents": [
        {
          "x": 110,
          "y": 150
        },
        {
          "x": 240,
          "y": 150,
          "type": "link",
          "path": "/Applications"
        }
      ]
    },
    "linux": {
      "target": [
        "AppImage",
        "deb"
      ]
    },
    "win": {
      "target": "squirrel",
      "icon": "build/favicon.ico"
    },
    "directories": {
      "buildResources": "assets"
    }
  },
6reactions
vishakhag6commented, Apr 15, 2019

How did you solve your issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application entry file "build/electron.js" in the "<path>/dist/mac ...
Seems like a wrong configuration. Error: Application entry file "build/electron.js" in the "<path>/dist/mac/<app-name>/Contents/Resources/app.asar" does not ...
Read more >
node.js - Application entry file does not exist in Electron Builder
js " in the "[path-to-project]/dist/mac/myapp.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.
Read more >
Fixing "Error - Application entry file `dist/src/main` ... does not ...
asar " does not exist. Seems like a wrong configuration. So I did that for solving:.
Read more >
Common Configuration - electron-builder
Node modules, that must be unpacked, will be detected automatically, you don't need to explicitly set asarUnpack - please file an issue if...
Read more >
code signature in [app] not valid … | Apple Developer Forums
But it appears there is no similar entitlement for sandbox apps and that sandbox ... A JavaScript error occurred in the main process...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found