Error Electron Builder building for Github Actions in Unix(Mac & Linux). EEXIST: file already exists · Issue #6124 · electron-userland/electron-builder · GitHub
Skip to content

Error Electron Builder building for Github Actions in Unix(Mac & Linux). EEXIST: file already exists #6124

Closed

Description

@mo3et
  • Electron-Builder Version: version=22.11.7 os=5.8.0-1039-azure
  • Node Version: 14
  • Electron Version: 13.1.2
  • Electron Type (current, beta, nightly): current
  • Target: Linux and Mac

I try to build my Electron APP for Github Actions.Everything is success,but I use the electron builder to build is failed.I so no understand to this problem.
Details:

Building the Electron app…
yarn run v1.22.10
$ /home/runner/work/sql/sql/node_modules/.bin/electron-builder --linux
  • electron-builder  version=22.11.7 os=5.8.0-1039-azure
  • artifacts will be published if draft release exists  reason=CI detected
  • loaded configuration  file=/home/runner/work/sql/sql/packages/desktop/electron-builder.yml
  • rebuilding native dependencies  dependencies=ffi-napi@4.0.3, ref-napi@3.0.2 platform=linux arch=x64
  • rebuilding native dependency  name=ref-napi version=3.0.2
  • rebuilding native dependency  name=ffi-napi version=4.0.3
  • packaging       platform=linux arch=x64 electron=13.1.2 appOutDir=dist/linux-unpacked
  • downloading     url=https://github.com/electron/electron/releases/download/v13.1.2/electron-v13.1.2-linux-x64.zip size=77 MB parts=4
  • downloaded      url=https://github.com/electron/electron/releases/download/v13.1.2/electron-v13.1.2-linux-x64.zip duration=968ms
  • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
  ⨯ EEXIST: file already exists, link '/home/runner/work/sql/sql/packages/desktop/node_modules/ajv/LICENSE' -> '/home/runner/work/sql/sql/packages/desktop/dist/linux-unpacked/resources/app/node_modules/ajv/LICENSE'  failedTask=build stackTrace=Error: EEXIST: file already exists, link '/home/runner/work/sql/sql/packages/desktop/node_modules/ajv/LICENSE' -> '/home/runner/work/sql/sql/packages/desktop/dist/linux-unpacked/resources/app/node_modules/ajv/LICENSE'
    at processImmediate (internal/timers.js:464:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1.6.0/index.js:144
				throw err;
				^

Error: Command failed: yarn run electron-builder --linux  
    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.6.0/index.js:21:27)
    at runAction (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1.6.0/index.js:132:4)
    at Object.<anonymous> (/home/runner/work/_actions/samuelmeuli/action-electron-builder/v1.6.0/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: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 3686,
  stdout: null,
  stderr: null
}

I worry about it. I using to my Local PC is no anything error.Only lucky thing is the windows version are sucessful build to Github Actions and my local PC. I test to my **local Mac,Ubuntu and Windows **.They are no error to electron-builder on build.

I can't understand to this ajv/LICENSE is file already exists. Pls tell me so why?Thanks.

Activity

  1. mo3et commented on Aug 3, 2021

    @mo3et
    Author

    package.json

    {
      "name": "desktop",
      "description": "sql editor",
      "version": "0.0.2",
      "main": "main.js",
      "scripts": {
        "start": "electron .",
        "watch": "cross-env NODE_ENV=development webpacker watch",
        "build": "cross-env NODE_ENV=production webpacker build",
        "dist": "yarn build && electron-builder"
      },
      "private": true,
      "dependencies": {
        "@swiftcarrot/react-auth": "^0.3.0",
        "@swiftcarrot/react-form": "^1.0.3",
        "@swiftcarrot/react-router": "^0.2.8",
        "electron-is-dev": "^2.0.0",
        "electron-store": "^8.0.0",
        "ffi-napi": "^4.0.3",
        "mkdirp": "^1.0.4",
        "react": "^17.0.2",
        "react-dom": "^17.0.2",
        "uuid": "^8.3.2"
      },
      "devDependencies": {
        "cross-env": "^7.0.3",
        "electron": "^13.1.2",
        "electron-builder": "^22.11.7"
      } 
    }
    
    
  2. mo3et commented on Aug 3, 2021

    @mo3et
    Author

    The Labels is Mac and Linux. No WIndows !

  3. mo3et commented on Aug 3, 2021

    @mo3et
    Author

    Github Action YAML:

    name: release
    on:
      push:
        # tags:
        #   - 'v*.*.*'
        branches: [actions]
    jobs:
      release:
        runs-on: ${{ matrix.os }}
    
        strategy:
          matrix:
            os: [ubuntu-latest,windows-latest] # macos-latest, 
          # fail-fast: false  # Default is true
        steps:
          - name: Checkout
            uses: actions/checkout@v2.3.4
          - name: Setup Go environment
            uses: actions/setup-go@v2.1.3
          - name: Setup Node.js environment
            uses: actions/setup-node@v2.2.0
            with:
              node-version: '14'
              cache: 'yarn'
          - run: yarn
          - name: Go Build for Windows
            if: startsWith(matrix.os, 'windows')
            run: |
              cd packages/desktop/client
              go build -o main.dll -buildmode=c-shared main.go
         
          - name: Go Build for Unix
            if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
            run: |
              cd packages/desktop/client
              make
    
          # - name: electron mac os security identities
          #   if: startsWith(matrix.os, 'macos')
          #   run: security find-identity -v
    
          - name: Build/release Electron app (Electron Builder Action)
            uses: samuelmeuli/action-electron-builder@v1.6.0
            with:
              # GitHub token, automatically provided to the action
              # (No need to define this secret in the repo settings)
              github_token: ${{ secrets.github_token }}
              package_root: packages/desktop
    
              # 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') }}
              
              # # macOS code signing certificate
              # mac_certs: ${{ secrets.mac_certs }}
              # mac_certs_password: ${{ secrets.mac_certs_password }}
    
    
    
  4. mo3et commented on Aug 4, 2021

    @mo3et
    Author

    electron-builder.yml

    asar: false
    electronVersion: 13.1.2
    files:
      - package.json
      - main.js
      - preload.js
      - renderer.js
      - client/
      - build/
      - node_modules/
      - storage.js
    win:
      target: ["nsis"]
      publish:
        - github
    nsis:
      oneClick: false
    linux:
      target: ["AppImage"]
      category: "Development"
    mac:
      category: "public.app-category.developer-tools"
    dmg:
      icon: false
    
  5. feugy commented on Sep 25, 2021

    @feugy
    Contributor

    I confirm having the exact same issue.

    When running the builder on my local machine (Ubuntu 20), everything works smoothly, but on the Github runner, it fails.
    Cleaning the dist folder prior to builder the app does not solve anything.

    The regression started to happen with electron-builder@22.11.1, so for the time being, I'm stuck in 22.10.5.

  6. 1zilc commented on Oct 16, 2021

    @1zilc

    same problem

  7. added a commit that references this issue on Oct 16, 2021
  8. rbuck-som commented on Oct 23, 2021

    @rbuck-som

    same problem

  9. stale commented on Apr 17, 2022

    @stale

    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.

  10. shanhexi commented on Mar 31, 2024

    @shanhexi

    I also have this problem, I don't know how to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions