Jump to content

Need help exporting Electron app to distributible package

AlTech
Go to solution Solved by seabrookmx,
17 hours ago, AluminiumTech said:

At this point, I think it's a json problem more than anything else.

I haven't touched Electron in a while.. but just looking at your package json, it looks like the "linux" and "mac" build parameters should be inside the "build" object beside the "win" object. But they're actually top level items in the JSON. Is that intentional?

Hi guys,

I'm making an app using Electron and I've tried to export my electron app. I've tried using Electron Builder (a third party CLI which can help distribute it).

 

And I'm having issues exporting it.

 

This is the output from the debug file....

Quote

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dist' ]
2 info using npm@3.10.8
3 info using node@v6.9.1
4 verbose run-script [ 'predist', 'dist', 'postdist' ]
5 info lifecycle aluminiumcode@0.1.0~predist: aluminiumcode@0.1.0
6 silly lifecycle aluminiumcode@0.1.0~predist: no script for predist, continuing
7 info lifecycle aluminiumcode@0.1.0~dist: aluminiumcode@0.1.0
8 verbose lifecycle aluminiumcode@0.1.0~dist: unsafe-perm in lifecycle true
9 verbose lifecycle aluminiumcode@0.1.0~dist: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\alast\Documents\GitHub\AluminiumCode\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\alast\.dnx\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\alast\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\alast\AppData\Local\Programs\Python\Python35-32\;G:\Lithium v2\depot_tools;C:\Program Files (x86)\FAHClient;C:\Users\alast\AppData\Roaming\npm;C:\Users\alast\AppData\Local\atom\bin
10 verbose lifecycle aluminiumcode@0.1.0~dist: CWD: C:\Users\alast\Documents\GitHub\AluminiumCode
11 silly lifecycle aluminiumcode@0.1.0~dist: Args: [ '/d /s /c', 'build' ]
12 silly lifecycle aluminiumcode@0.1.0~dist: Returned: code: 4294967295  signal: null
13 info lifecycle aluminiumcode@0.1.0~dist: Failed to exec dist script
14 verbose stack Error: aluminiumcode@0.1.0 dist: `build`
14 verbose stack Exit status 4294967295
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid aluminiumcode@0.1.0
16 verbose cwd C:\Users\alast\Documents\GitHub\AluminiumCode
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dist"
19 error node v6.9.1
20 error npm  v3.10.8
21 error code ELIFECYCLE
22 error aluminiumcode@0.1.0 dist: `build`
22 error Exit status 4294967295
23 error Failed at the aluminiumcode@0.1.0 dist script 'build'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the aluminiumcode package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     build
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs aluminiumcode
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls aluminiumcode
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
 

 

Here is the code from my package.json file:

{
  "name": "aluminiumcode",
  "productName": "AluminiumCode",
  "version": "0.1.0",
  "description": "A text and code editor built by AluminiumTech!",
  "homepage": "https://github.com/aluminiumCode/aluminiumcode",
  "main": "main.js",

  "scripts": {
  "start": "electron main.js",
  "pack": "build --dir",
    "dist": "build"
},
  "repository": {
    "type": "git",
    "url": "git+https://github.com/AluminiumCode/AluminiumCode.git"
  },
  "author": "AluminiumTech",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/AluminiumCode/AluminiumCode/issues"
  },
  "build":{
"copyright": "Copyright 2016 AluminiumTech",
"productName": "AluminiumCode",

  "win": {
"target": "zip"
  }
},

  "linux":{
    "category": "Development",
    "description": "A work in progress code and text editor.",
    "target": "deb",
    "synopsis": "A work in progress code and text editor.",
    "maintainer": "AluminiumTech",
    "vendor": "AluminiumTech",
    "compression": "xz",
    "executableName": "AluminiumCode"
  },

  "mac":{
    "category": "public.app-category.developer-tools",
    "target": "dmg"
  }
}

 

 

Thanks much :).

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

At this point, I think it's a json problem more than anything else.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, AluminiumTech said:

At this point, I think it's a json problem more than anything else.

I haven't touched Electron in a while.. but just looking at your package json, it looks like the "linux" and "mac" build parameters should be inside the "build" object beside the "win" object. But they're actually top level items in the JSON. Is that intentional?

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, seabrookmx said:

I haven't touched Electron in a while.. but just looking at your package json, it looks like the "linux" and "mac" build parameters should be inside the "build" object beside the "win" object. But they're actually top level items in the JSON. Is that intentional?

Nope. it's not. Thanks for point this out :)!

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

@seabrookmx Sorry if this seems like a stupid question but do I need to build the source code on a  Mac for the mac version?

 

And same for building the Linux version on Linux?

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×