Closed maxcnunes closed 8 years ago
Thanks for detailed issue report.
Please xz --version
?
Try to set compression to gz
(see https://github.com/electron-userland/electron-builder/wiki/Options#buildlinux).
Yep, it seems xz
is not installed on your system.
And please update fpm to 1.5 (gem update fpm
).
Awesome! Just changing the compression was enough. Thanks @develar :clap:
@maxcnunes Please use only xz
. So, please install xz. I use Ubuntu to test — xz installed by default and I guess on Debian it should be available as well.
Ok. I have installed xz
with xz-utils
package and now it is working without setting the compression type.
Maybe would be good include this package in https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux.
Thanks! I will fix docs.
I got another problem building windows on Linux.
npm info ok
Removing /usr/src/app/dist/win-x64
Downloading electron-v0.37.5-win32-x64.zip
[============================================>] 100.0% of 47.05 MB (635.8 kB/s)
Packaging app for platform win32 x64 using electron v0.37.5
Error: spawn mono ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:437:9)
at process._tickCallback (node.js:351:17)
From previous event:
at spawn (/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/spawn-promise.js:22:10)
at Object.<anonymous> (/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/index.js:111:38)
at [object Generator].next (native)
at /usr/src/app/node_modules/electron-builder/node_modules/fs-extra/node_modules/graceful-fs/graceful-fs.js:43:10
at /usr/src/app/node_modules/electron-builder/node_modules/read-package-json/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:82:15)
From previous event:
at Object.createWindowsInstaller (/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/index.js:175:16)
at WinPackager.<anonymous> (/usr/src/app/node_modules/electron-builder/src/winPackager.ts:144:48)
at [object Generator].next (native)
From previous event:
at tsAwaiter (/usr/src/app/node_modules/electron-builder/src/awaiter.ts:10:51)
at Object.build (/usr/src/app/node_modules/electron-builder/src/builder.ts:30:59)
at Object.<anonymous> (/usr/src/app/node_modules/electron-builder/src/build-cli.ts:41:2)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:134:18)
at node.js:962:3
npm info @ Failed to exec dist:win64 script
npm ERR! Linux 4.3.6-coreos
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dist:win64"
npm ERR! node v4.3.2
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! @ dist:win64: `build --platform win32 --arch x64`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the @ dist:win64 script 'build --platform win32 --arch x64'.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! build --platform win32 --arch x64
npm ERR! You can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/app/npm-debug.log
After some debugging it I found out that /usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/index.js:111:38
was trying to execute itL
>>>>cmd mono
>>>>args [ '/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/vendor/nuget.exe',
'pack',
'/usr/src/app/si-116313-4299-1o55t3m/Sqlectron.nuspec',
'-BasePath',
'/usr/src/app/dist/Sqlectron-win32-x64',
'-OutputDirectory',
'/usr/src/app/si-116313-4299-1o55t3m',
'-NoDefaultExcludes',
'-NonInteractive',
'-Verbosity',
'quiet' ]
Then I have installed mono-complete following these steps http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives.
After that I got this error:
npm info ok
Removing /usr/src/app/dist/win-x64
Packaging app for platform win32 x64 using electron v0.37.5
System.InvalidOperationException: The input package file /usr/src/app/dist/win-x64/Sqlectron.1.5.0.nupkg targets no platform and cannot be transformed into a release package.
at Squirrel.ReleasePackage.CreateReleasePackage (System.String outputFile, System.String packagesRootDir, System.Func`2 releaseNotesProcessor, System.Action`1 contentsPostProcessHook) [0x00000] in <filename unknown>:0
at Squirrel.Update.Program.Releasify (System.String package, System.String targetDir, System.String packagesDir, System.String bootstrapperExe, System.String backgroundGif, System.String signingOpts, System.String baseUrl, System.String setupIcon, Boolean generateMsi) [
0x00000] in <filename unknown>:0
at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x00000] in <filename unknown>:0
at Squirrel.Update.Program.main (System.String[] args) [0x00000] in <filename unknown>:0
Error: mono failed with exit code: 255
at ChildProcess.<anonymous> (/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/spawn-promise.js:33:16)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:821:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
From previous event:
at spawn (/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/spawn-promise.js:22:10)
at Object.<anonymous> (/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/index.js:155:38)
at [object Generator].next (native)
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at Object.createWindowsInstaller (/usr/src/app/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/index.js:175:16)
at WinPackager.<anonymous> (/usr/src/app/node_modules/electron-builder/src/winPackager.ts:144:48)
at [object Generator].next (native)
From previous event:
at tsAwaiter (/usr/src/app/node_modules/electron-builder/src/awaiter.ts:10:51)
at Object.build (/usr/src/app/node_modules/electron-builder/src/builder.ts:30:59)
at Object.<anonymous> (/usr/src/app/node_modules/electron-builder/src/build-cli.ts:41:2)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:134:18)
at node.js:962:3
npm info @ Failed to exec dist:win64 script
npm ERR! Linux 4.3.6-coreos
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dist:win64"
npm ERR! node v4.3.2
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! @ dist:win64: `build --platform win32 --arch x64`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the @ dist:win64 script 'build --platform win32 --arch x64'.
npm ERR! This is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! build --platform win32 --arch x64
npm ERR! You can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/app/npm-debug.log
Any idea how to fix that?
@maxcnunes Please file separate issue in the future. Your issue — mono/wine is outdated, please see https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux about mono/wine installation on Linux. wine must be 1.8+, mono must be 4+.
The README could do with a bit of work. I had the exact same issue, albeit on a Mac (trying to build for Linux). Solved the FPM related error by installing xz. Maybe xz should be added as a dependency?
@MadsRC It is documented here https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux xz-utils
in the list of required packages.
Maybe xz should be added as a dependency?
Yeah, it is a problem — xz-utils and fpm is a system packages, not npm. So, you have to read docs and it is not a user-friendly.
I got this error on building an app on Linux:
Debian GNU/Linux 8 (jessie)
0.37.5
4.3.2
2.14.12
1.4.0
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
gcc (Debian 4.9.2-10) 4.9.2
GNU Make 4.0
Does anyone has any idea why this is happening? Or what to do to fix it?