Open
Description
I've been trying to create a Windows installer for my Electron application with the electron-winstaller module by running the following code:
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller
const path = require('path')
getInstallerConfig()
.then(createWindowsInstaller)
.catch((error) => {
console.error(error.message || error)
process.exit(1)
})
function getInstallerConfig () {
const installerPath = path.join('.');
const releaseBuildsPath = path.join('..', '..', 'release-builds');
const assetsPath = path.join('..', '..', 'assets');
return Promise.resolve({
appDirectory: path.join(releaseBuildsPath, '[application name]-win32-x64'),
authors: '[my name]',
noMsi: true,
outputDirectory: installerPath,
exe: '[application name].exe',
setupExe: '[application name].exe',
setupIcon: path.join(assetsPath, 'demo.ico'),
})
}
However, I keep getting the following error:
Failed with exit code: 1
Output:
Attempting to build package from '[application name].nuspec'.
lib/net45/resources/app.asar
Stream was too long.
The script I ran to create the windows package is this:
electron-packager . [application name] --overwrite --asar --platform=win32 --arch=x64 --icon=assets/demo.ico --prune=true --out=release-builds
With the asar
option enabled and the prune
flag set to true, I don't see any other options for reducing the size of the app.asar file, which supposedly is too large and causing this issue.
I also don't quite understand where the lib/net45/resources/app.asar file shown in the above error message is located; there is no directory named "lib" or "net45" on my system (macOS Mojave).
Here is the detailed result of running the script with the debugging output enabled:
electron-windows-installer:main Using Mono: 'mono' +0ms
electron-windows-installer:main Using Wine: 'wine' +2ms
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>[application name]</id>
electron-windows-installer:main <title>[application name]</title>
electron-windows-installer:main <version>1.0.0</version>
electron-windows-installer:main <authors>tg</authors>
electron-windows-installer:main <owners>tg</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>A desktop vocabulary builder app</description>
electron-windows-installer:main <copyright>Copyright © 2019 tg</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="*.exe.config" target="lib/net45" />
electron-windows-installer:main <file src="*.exe.sig" target="lib/net45" />
electron-windows-installer:main <file src="icudtl.dat" target="lib/net45/icudtl.dat" />
electron-windows-installer:main <file src="Squirrel.exe" target="lib/net45/squirrel.exe" />
electron-windows-installer:main <file src="LICENSE" target="lib/net45/LICENSE" />
electron-windows-installer:main <file src="[application name].exe" target="lib/net45/[application name].exe" />
electron-windows-installer:main </files>
electron-windows-installer:main </package>
electron-windows-installer:main +7s
Failed with exit code: 1
Output:
Attempting to build package from '[application name].nuspec'.
lib/net45/resources/app.asar
Stream was too long.
Any suggestion will be greatly appreciated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels