electron / windows-installer

Build Windows Installers for Electron apps
MIT License
1.58k stars 262 forks source link

Could not find file "/etc/localtime" #232

Open matgenois opened 6 years ago

matgenois commented 6 years ago

I'm using Gitlab-CI to build electron and creating Windows single .exe with this docker image electronuserland/builder:wine-mono

give me this error. /etc/localtime exist in this docker image. I don't know from where this come from.

creating windows installer for Alfred POS
config { appDirectory: 'release-builds/synchro-pos-win32-x64/',
  authors: 'Celliers Intelligents',
  noMsi: true,
  outputDirectory: 'release-builds/windows-installer',
  exe: 'synchro-pos.exe',
  setupExe: 'AlfredPosInstaller.exe' }
path exist? true
  electron-windows-installer:main Using Mono: 'mono' +0ms
  electron-windows-installer:main Using Wine: 'wine' +1ms
  electron-windows-installer:main Created NuSpec file:
  electron-windows-installer:main <?xml version="1.0" encoding="utf-8"?>
  electron-windows-installer:main <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  electron-windows-installer:main   <metadata>
  electron-windows-installer:main     <id>synchro-pos</id>
  electron-windows-installer:main     <title>synchro-pos</title>
  electron-windows-installer:main     <version>1.1.1</version>
  electron-windows-installer:main     <authors>Celliers Intelligents</authors>
  electron-windows-installer:main     <owners>Celliers Intelligents</owners>
  electron-windows-installer:main     <iconUrl>https://raw.githubusercontent.com/atom/electron/master/atom/browser/resources/win/atom.ico</iconUrl>
  electron-windows-installer:main     <requireLicenseAcceptance>false</requireLicenseAcceptance>
  electron-windows-installer:main     <description>P.O.S synchronization app</description>
  electron-windows-installer:main     <copyright>Copyright © 2018 Celliers Intelligents</copyright>
  electron-windows-installer:main   </metadata>
  electron-windows-installer:main   <files>
  electron-windows-installer:main     <file src="locales/**" target="lib/net45/locales" />
  electron-windows-installer:main     <file src="resources/**" target="lib/net45/resources" />
  electron-windows-installer:main     <file src="*.bin" target="lib/net45" />
  electron-windows-installer:main     <file src="*.dll" target="lib/net45" />
  electron-windows-installer:main     <file src="*.pak" target="lib/net45" />
  electron-windows-installer:main     <file src="Update.exe" target="lib/net45/squirrel.exe" />
  electron-windows-installer:main     <file src="icudtl.dat" target="lib/net45/icudtl.dat" />
  electron-windows-installer:main     <file src="LICENSE" target="lib/net45/LICENSE" />
  electron-windows-installer:main     <file src="synchro-pos.exe" target="lib/net45/synchro-pos.exe" />
  electron-windows-installer:main   </files>
  electron-windows-installer:main </package>
  electron-windows-installer:main  +120ms
  electron-windows-installer:spawn Spawning mono /builds/celliersintelligents/synchro-pos/node_modules/electron-winstaller/vendor/nuget.exe pack /tmp/si-11818-1481-13ugw8f.gwns/synchro-pos.nuspec -BasePath release-builds/synchro-pos-win32-x64/ -OutputDirectory /tmp/si-11818-1481-13ugw8f.gwns -NoDefaultExcludes +3ms
Unhandled rejection Error: Failed with exit code: 1
Output:
Attempting to build package from 'synchro-pos.nuspec'.
Could not find file "/etc/localtime"

    at ChildProcess.proc.on.code (/builds/celliersintelligents/synchro-pos/node_modules/electron-winstaller/lib/spawn-promise.js:62:16)
    at ChildProcess.emit (events.js:160:13)
    at maybeClose (internal/child_process.js:943:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
Done in 1.47s.
mathieulaporte commented 6 years ago

I have the same error on Gitlab-CI with electronuserland/builder:wine-mono

pgebheim commented 6 years ago

Just ran into this issue as well, has anyone solved it?

petong commented 6 years ago

This happens due to /etc/localtime being a dangling symlink. Installing the tzdata package will fix this. There were some ubuntu docker images published that had this problem: https://bugzilla.xamarin.com/show_bug.cgi?id=56499

ghost commented 6 years ago

this isn't a windows-installer issue.as @petong pointed out.