Passing dir option to builder.build() throws "Unknown option" error
See original GitHub issue- Version: 22.8.0
- Electron Version: 9.1.2
- Electron Type (current, beta, nightly): current
- Target: Windows
Passing the dir
option to builder.build()
:
const builder = require('electron-builder')
const Platform = builder.Platform
builder.build({
targets: Platform.WINDOWS.createTarget(),
dir: true,
})
throws an error:
• electron-builder version=22.8.0 os=10.0.18362
(node:13872) UnhandledPromiseRejectionWarning: Error: Unknown option "dir"
at checkBuildRequestOptions (C:\dev\carlo\pbi-tips\business-ops\node_modules\app-builder-lib\src\index.ts:44:13)
at build (C:\dev\carlo\pbi-tips\business-ops\node_modules\app-builder-lib\src\index.ts:50:3)
at Object.build (C:\dev\carlo\pbi-tips\business-ops\node_modules\electron-builder\src\builder.ts:218:10)
at createExe (C:\dev\carlo\pbi-tips\business-ops\bld\build-exe.js:12:31)
even though according to the typescript types this should be valid:
export interface CliOptions extends PackagerOptions, PublishOptions {
x64?: boolean;
ia32?: boolean;
armv7l?: boolean;
arm64?: boolean;
dir?: boolean;
}
export declare function build(rawOptions?: CliOptions): Promise<Array<string>>;
I couldn’t find documentation around thedir
flag on JavaScript API (although it is present in the CLI documentation).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
mkdir throws 'unknown option' error - bash - Stack Overflow
The mkdir command tries to interpret "-AFolder/" as an option as it begins with a - . Use the -- dummy argument to...
Read more >Error Codes | Yarn - Package Manager
When passing the --immutable option to yarn install , Yarn will ensure that the lockfile isn't modified in the process and will instead...
Read more >Exploring Joshua Bloch's Builder design pattern in Java
Bloch's Builder pattern can be thought of as a workaround for a missing language feature.
Read more >Protocol Buffer Basics: Java - Google Developers
This tutorial provides a basic Java programmer's introduction to working with protocol buffers. By walking through creating a simple example application, ...
Read more >Static files in ASP.NET Core | Microsoft Learn
AddAuthorization(options => { options.FallbackPolicy = new AuthorizationPolicyBuilder() .RequireAuthenticatedUser() .Build(); }); var app ...
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
As a workaround, this seems to work:
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.