Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron Builder Script not working #52

Open
kavinvalli opened this issue Dec 19, 2020 · 8 comments
Open

Electron Builder Script not working #52

kavinvalli opened this issue Dec 19, 2020 · 8 comments

Comments

@kavinvalli
Copy link

Hi. I am getting this error in the workflow

Building and releasing the Electron app…
not found: electron-builder
/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:144
				throw err;
				^

Error: Command failed: npx --no-install electron-builder --linux --publish always 
    at checkExecSyncError (child_process.js:621:11)
    at execSync (child_process.js:657:15)
    at run (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:21:27)
    at runAction (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:132:4)
    at Object.<anonymous> (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1/index.js:150:1)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
  status: 127,
  signal: null,
  output: [ null, null, null ],
  pid: 2511,
  stdout: null,
  stderr: null
}

Should I add it in my dependencies?

@pigLoveRabbit520
Copy link

same error, anyone advice?

@mkurczewski
Copy link

Same for me 😞

@boyphongsakorn
Copy link

Same for me too

@boyphongsakorn
Copy link

boyphongsakorn commented Feb 1, 2021

i add

- run: npm install electron-builder --save-dev

in build.yml it's work
but error from postInstall -_-

@ThomasReyskens
Copy link

I fixed it by moving the electron dependency to devDeps (I still think that it is not this library to decide where the dep. should be..) And adding an extra env option:

env:
  NODE_OPTIONS: '--max_old_space_size=4096'

@kaiserdj
Copy link

I fixed it by moving the electron dependency to devDeps (I still think that it is not this library to decide where the dep. should be..) And adding an extra env option:

env:
  NODE_OPTIONS: '--max_old_space_size=4096'

I did not understand very well, I have the same problem but I do not have much knowledge of Actions. 😢

ransome1 pushed a commit to ransome1/sleek that referenced this issue Mar 16, 2021
@ransome1
Copy link

i add

- run: npm install electron-builder --save-dev

in build.yml it's work
but error from postInstall -_-

Having the same error, but this did not solve the problem. Did anybody find another approach?

@julian-alarcon
Copy link

You could add the environment variables in the workflow yaml file. This is an example:

      - name: Build/release Electron app
        uses: samuelmeuli/action-electron-builder@v1
        with:
          # GitHub token, automatically provided to the action
          # (No need to define this secret in the repo settings)
          github_token: ${{ secrets.github_token }}

          # If the commit is tagged with a version (e.g. "v1.0.0"),
          # release the app after building
          release: ${{ startsWith(github.ref, 'refs/tags/v') }}
        env:
          NODE_OPTIONS: '--max_old_space_size=4096'

I was getting a similar error, but after checking a little closer, I was trying to build pacman packages but with the current runner, it seems that Github changed the default runner to Ubuntu 20.04 a few months ago https://github.blog/changelog/2020-10-29-github-actions-ubuntu-latest-workflows-will-use-ubuntu-20-04/

This is causing some errors related with the missing binary bsdtar used by the pacman builder. I found this workaround electron-userland/electron-builder#4181 . Just install libarchive-tools for the runner.

Can you try this? This is a reported error #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants