Console Output
stupid-machine@felli0t:~/lputouchosx$ electron-forge package
โ Checking your system
โ Preparing to Package Application for arch: x64Entry point: main.js
Electron forge was terminated:
The entry point to your application ("packageJSON.main") must be in a subfolder not in the top level directory
My package.json is
{
"name": "LPUTouch",
"version": "1.0.0",
"description": "LPU Touch electron client",
"main": "main.js",
"scripts": {
"postinstall": "install-app-deps",
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make"
},
"repository": {
"type": "git",
"url": "git+https://github.com/its-arun/LPU-Touch-Electron.git"
},
"author": "Arun Chaudhary",
"license": "ISC",
"bugs": {
"url": "https://github.com/its-arun/LPU-Touch-Electron/issues"
},
"homepage": "https://github.com/its-arun/LPU-Touch-Electron#readme",
"dependencies": {
"electron-compile": "^6.4.2",
"electron-squirrel-startup": "^1.0.0",
"request": "^2.83.0",
"requests": "^0.2.2"
},
"devDependencies": {
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"electron-forge": "^5.1.1",
"electron-prebuilt-compile": "1.8.2"
},
"config": {
"forge": {
"make_targets": {
"win32": [
"squirrel",
"appx",
"wix"
],
"darwin": [
"zip",
"dmg"
],
"linux": [
"deb",
"rpm"
]
},
"electronPackagerConfig": {
"packageManager": "npm"
},
"electronWinstallerConfig": {
"name": "LPUTouch"
},
"electronInstallerDebian": {},
"electronInstallerRedhat": {},
"github_repository": {
"owner": "",
"name": ""
},
"windowsStoreConfig": {
"packageName": "",
"name": "LPUTouch"
}
}
}
}
Folder Structure
.
โโโ assets
โย ย โโโ lpu.png
โย ย โโโ ums_bg.jpg
โโโ build
โย ย โโโ background.png
โย ย โโโ icon.icns
โย ย โโโ icon.ico
โโโ index.css
โโโ index.html
โโโ index.js
โโโ main.js
โโโ node_modules
The entry point to your application ("packageJSON.main") must be in a subfolder not in the top level directory
The error tells you what is wrong ๐ Your main entry point is pointing at a JS file in the top level of your app. It needs to be pointing to something in a folder. Move your code to like a src directory ๐
Can you explain why this is mandatory ?
I don't really understand.
I am somehow forced to put my package.json in the top level of my project because of the use of a template (angular-electron)
Most helpful comment
Can you explain why this is mandatory ?
I don't really understand.
I am somehow forced to put my package.json in the top level of my project because of the use of a template (angular-electron)