electron-builder: Application entry can't be found

Hey,all I followed the two package.json structure in the document, but when I ran npm run build, it reported an error that Application entry file couldn't be found in package.Seems like a wrong configuration 2016-04-29 10 46 43

the package.json in the root of the project is:

  ...
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "postinstall": "install-app-deps",
    "clean": "rimraf dist",
    "build": "build"
  },
  "build": {
    "app-bundle-id": "com.smartstudy.toefl",
    "app-category-type": "public.app-category.education"
  },
  ...

and the structure of app directory is: 2016-04-29 10 51 07 the package.json in app directory is:

{
  "name": "toefl",
  "version": "0.0.1",
  "description": "this is toefl-pc",
  "main": "./index.js",
  "private": true,
  "author": "caibirdme",
  "license": "ISC",
  "dependencies": {
    "request": "^2.71.0",
    "sequelize": "^3.21.0",
    "sqlite3": "^3.1.3"
  }
}

version: node 5.10.0 npm 3.8.3 electron 0.37.5 electron-builder 3.13.1

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 31 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Try setting “main” property in your root package.json to be “app/index.js”

@caibirdme So it seems that electron-builder error message is misleading and should be fixed (I 'll create a PR soon). Can you confirm that the problem still arises on the latest stable release of electron-builder (3.17.1)? Can also you clarify the OS on which your build fails? The output shows building on darwin but in 366 you mention that the error occurs when building on win7-x64. Thanks