Electron-builder: unknown long flag '--build-resource-dir' - while building from windows to linux

Created on 23 Jul 2018  Â·  4Comments  Â·  Source: electron-userland/electron-builder

  • Version:
    20.24.4
  • Target:
    Linux
  • Building from Windows to Linux throws "unknown long flag '--build-resource-dir'" error. It had to appear in current version since i have successfully built with version 20.22.0. I haven't been changing settings since then, only version.
  • electron-builder version=20.24.4
  • loaded configuration file=package.json ("build" field)
  • writing effective config file=dist\builder-effective-config.yaml
  • no native production dependencies
  • packaging       platform=linux arch=x64 electron=2.0.5 appOutDir=dist\linux-unpacked
  • scheduling remote build target=appImage arch=x64
  ⨯ unknown long flag '--build-resource-dir'

(i guess it's caused because you upgraded that win tools in v20.23.0 or "validate build options" in v20.24.1)

All 4 comments

Please try 20.24.5 I will mark this release as latest, thanks a lot.

issue still appears even after changing version to 20.24.5.
Error: C:\Users\user\Desktop\app\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code 1 at ChildProcess.childProcess.once.code (C:\Users\user\Desktop\app\node_modules\builder-util\src\util.ts:251:14) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) From previous event: at RemoteBuilder._build (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\remoteBuilder\RemoteBuilder.ts:56:83) at _bluebirdLst.default.mapSeries.arch (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\remoteBuilder\RemoteBuilder.ts:51:19) From previous event: at RemoteBuilder.build (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\remoteBuilder\RemoteBuilder.ts:50:28) at C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\linuxPackager.ts:99:30 From previous event: at RemoteTarget.finishBuild (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\linuxPackager.ts:97:20) at C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\packager.ts:384:36 at Generator.next (<anonymous>) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) From previous event: at Packager.doBuild (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\packager.ts:344:39) at C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\packager.ts:314:57 at Generator.next (<anonymous>) at C:\Users\user\Desktop\app\node_modules\graceful-fs\graceful-fs.js:99:16 at C:\Users\user\Desktop\app\node_modules\graceful-fs\graceful-fs.js:43:10 at FSReqWrap.oncomplete (fs.js:135:15) From previous event: at Packager._build (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\packager.ts:285:133) at C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\packager.ts:281:23 at Generator.next (<anonymous>) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) From previous event: at Packager.build (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\packager.ts:238:14) at build (C:\Users\user\Desktop\app\node_modules\app-builder-lib\src\index.ts:58:28) at build (C:\Users\user\Desktop\app\node_modules\electron-builder\src\builder.ts:226:10) at then (C:\Users\user\Desktop\app\node_modules\electron-builder\src\cli\cli.ts:42:48) at <anonymous>

I have tried installing 20.23.1 and this version works. So issue is from 20.24.x where you added validation

@develar I can confirm it happens with the latest version of electron-builder. As @kmdrGroch mentioned, everything works fine with 20.23.1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xingoxu picture xingoxu  Â·  3Comments

omarkilani picture omarkilani  Â·  3Comments

ccorcos picture ccorcos  Â·  3Comments

antonycourtney picture antonycourtney  Â·  3Comments

AidanNichol picture AidanNichol  Â·  3Comments