Error on electron-forge package
See original GitHub issueConsole 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
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error: Could not find module with name: @electron-forge ...
After I installed electron and forge, I wanted to package after completing the instructions in the above figure, but I always got the...
Read more >npm run make is not working in electron-forge - Stack Overflow
In my cases, it makes error when the description or author is empty in package.json file.
Read more >Configuration - Electron Forge
Electron Forge configuration is centralized in a single configuration object. You can specify this config in your package.json on the config.forge property.
Read more >electron-forge/core - npm
A complete tool for building modern Electron applications. Latest version: 6.0.4, last published: 19 days ago.
Read more >Problem with packaging Electron app - Replit
I also use VS Code as my IDE. Here is the error. > my-electron-app@1.0.0 make E:\Users\me\Documents\Electron\my-electron-app. > electron-forge make.
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 FreeTop 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
Top GitHub Comments
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)
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 asrc
directory 👍