question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug in release 22.1.0 "[object Object] error Command failed with exit code 1."

See original GitHub issue

Which version of electron-builder are you using?

  • Version: 22.1.0

Which version of electron-updater are you using (if applicable)?

  • Version: 4.2.0

What target are you building for?

  • Target: nsis-web
  • package.json:
    "build": {
        "appId": "com.xxx.yyy",
        "productName": "Viewer",
        "afterSign": "crv/config/afterSignHook.js",
        "directories": {
            "output": "build"
        },
        "nsisWeb": {
            "artifactName": "${productName}-Setup-${version}.${ext}",
            "oneClick": true,
            "perMachine": false,
            "allowToChangeInstallationDirectory": false,
            "runAfterFinish": true,
            "deleteAppDataOnUninstall": true,
            "differentialPackage": true
        },
        "publish": {
            "provider": "generic",
            "url": "https://www.xxxxx.com/${os}",
            "channel": "latest"
        },
        "files": [
            "!apps${/*}",
            "!tsconfig.json",
            "!tslint.json",
            "!yarn-error.log",
            "!yarn.lock"
        ],
        "win": {
            "extraResources": [
                {
                    "from": "crv/assets/data",
                    "to": "../",
                    "filter": "test*"
                }
            ],
            "icon": "crv/assets/icons/icon.ico",
            "target": [
                {
                    "target": "nsis-web",
                    "arch": [
                        "x64",
                        "ia32"
                    ]
                }
            ]
        },
        "mac": {
            "extraResources": [
                {
                    "from": "crv/assets/data",
                    "to": "../../../",
                    "filter": "test*"
                }
            ],
            "icon": "crv/assets/icons/icon.icns",
            "hardenedRuntime": true,
            "gatekeeperAssess": false
        }
    },
  • Error:
$ electron-builder .
  • electron-builder  version=22.1.0 os=10.0.18362
  • loaded configuration  file=package.json ("build" field)
  • electron-rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies

To ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`
  • writing effective config  file=build\builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=sqlite3@4.1.0 platform=win32 arch=x64
  • rebuilding native dependency  name=sqlite3 version=4.1.0
  • packaging       platform=win32 arch=x64 electron=7.1.1 appOutDir=build\win-unpacked
  • rebuilding native dependencies  dependencies=sqlite3@4.1.0 platform=win32 arch=ia32
  • rebuilding native dependency  name=sqlite3 version=4.1.0
  • packaging       platform=win32 arch=ia32 electron=7.1.1 appOutDir=build\win-ia32-unpacked
  • building        target=nsis-web file=build\nsis-web\Viewer-Setup-1.0.18.exe archs=x64, ia32 oneClick=true perMachine=false
  • building embedded block map  file=build\nsis-web\crv-1.0.18-ia32.nsis.7z
  • building embedded block map  file=build\nsis-web\crv-1.0.18-x64.nsis.7z
  ⨯ [object Object]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "run-electron-builder" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

With electron-builder version 21.2.0 everything works fine.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:27 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
VeselyTcommented, Jan 27, 2020

@dangeredwolf : since changes in version 22.1.0 some users cannot build with target set to nsis-web. Do you have an idea why we get the error message above? Can you build your or an boilerplate project with target set to nsis-web without errors?

I had to change this line https://github.com/electron-userland/electron-builder/blob/d738644d6e55b027c81e9b7cdd27dc5af9189b0a/packages/app-builder-lib/templates/nsis/include/webPackage.nsh#L20 to fix the build for me. It should be only ${if} ${IsNativeAMD64}

2reactions
youyinnncommented, Nov 17, 2019

I think I just luckily tested out why I got this error in my case. It is weird and you probably can not believe it: I use a 512x512 icon as app icon, and the configuration of installerIcon & uninstallerIcon is using it as default. Turns out I can not use 512x512 icon as installerIcon & uninstallerIcon Finally, I use 256x256 icon as installerIcon & uninstallerIcon and leave 512 to the app icon

And it worked,even on v22.1.0!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

error Command failed with exit code 1. when I try to run yarn
what you need to do is just simple: follow these steps: rm -rf node_modules; yarn cache clean; yarn; yarn start.
Read more >
oracle-apex-release-notes.pdf
In Oracle Application Express release 4.1, Automatic DML forms raised an error when rendering the page if the column name of the source...
Read more >
Release Notes and History - FlexSim
Fixed error with preempting an object that's in a preemtable shift schedule break. Fixed OnResume trigger getting duplicate values if multiple resources are ......
Read more >
Release Notes · Airframe - wvlet.github.io
This version upgrades to Scala 3.2.1 for Scala 2.13.10 compatibility through TASTy ... airframe-launcher: Fixes #2291 support nested objects in command args ...
Read more >
Release notes — Scrapy 2.7.1 documentation
ImagesPipeline.thumb_path now receives the source item (issue 5504, ... The scrapy parse -h command no longer throws an error (issue 5481, issue 5482) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found