hhd-dev/hhd-ui

Build Failed

Closed this issue · 4 comments

 > dev.hhd.hhd-ui@1.0.0 build
> npx electron-builder build --linux

  • electron-builder  version=24.9.1 os=6.5.0-1016-azure
  • artifacts will be published if draft release exists  reason=CI detected
  • loaded configuration  file=package.json ("build" field)
  • packaging       platform=linux arch=x64 electron=28.1.0 appOutDir=dist/linux-unpacked
  • downloading     url=https://github.com/electron/electron/releases/download/v28.1.0/electron-v28.1.0-linux-x64.zip size=102 MB parts=8
  • downloaded      url=https://github.com/electron/electron/releases/download/v28.1.0/electron-v28.1.0-linux-x64.zip duration=1.012s
  ⨯ Cannot detect repository by .git/config. Please specify "repository" in the package.json (https://docs.npmjs.com/files/package.json#repository).
Please see https://electron.build/configuration/publish  failedTask=build stackTrace=Error: Cannot detect repository by .git/config. Please specify "repository" in the package.json (https://docs.npmjs.com/files/package.json#repository).
Please see https://electron.build/configuration/publish
    at getInfo (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/publish/PublishManager.ts:547:13)
    at getResolvedPublishConfig (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/publish/PublishManager.ts:556:18)
    at resolvePublishConfigurations (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/publish/PublishManager.ts:439:16)
    at getPublishConfigs (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/publish/PublishManager.ts:413:10)
    at getAppUpdatePublishConfiguration (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/publish/PublishManager.ts:245:73)
    at /__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/publish/PublishManager.ts:114:29
    at Packager.afterPack (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/packager.ts:543:7)
    at LinuxPackager.doPack (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/platformPackager.ts:308:5)
    at LinuxPackager.pack (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/platformPackager.ts:136:5)
    at Packager.doBuild (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/packager.ts:442:9)
    at executeFinally (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/builder-util/src/promise.ts:12:14)
    at Packager._build (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/packager.ts:376:31)
    at Packager.build (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/app-builder-lib/src/packager.ts:337:12)
    at executeFinally (/__w/lunaos-repo/hhd-ui/src/hhd-ui/electron/node_modules/builder-util/src/promise.ts:12:14)
==> ERROR: A failure occurred in build().
    Aborting...

Just tested the AUR build. It works correctly. So I need more context.

Just tested the AUR build. It works correctly. So I need more context.

I use Github Action to build my repository in a worklow file I use this code to build it

cd /__w/my-repo
          git clone https://aur.archlinux.org/hhd-ui.git
          cd /__w/my-repo/hhd-ui
          chown user -R ...
          su user -c "yes '' | makepkg --noconfirm -s".
          rm -r /__w/my-repo/hhd-ui

Those commands work on my machine too. Maybe your runner is not cloning the repository properly?

Those commands work on my machine too. Maybe your runner is not cloning the repository properly?

It seems that, if you use Docker inside the runner, instead of using the standard Ubuntu, everything that requires Node.js to build stops working. This is a mistake on my part.