-1

First of all i'm VERY new to coding and i'm just following and reading documentation

I'm making a bluesky electron app, but when using yarn make or npm run make I get the followed error:

❯ yarn make
yarn run v1.22.22
warning ../../../package.json: No license field
$ electron-forge make
✔ Checking your system
✔ Loading configuration
✔ Loading configuration
✔ Resolving make targets
 › Making for the following targets: ,
❯ Running package command
 ✔ Preparing to package application
 ✔ Running packaging hooks
 ✔ Running generateAssets hook
 ✔ Running prePackage hook
 ❯ Packaging application
 ❯ Packaging for x64 on linux
 ✖ Copying files
 ✖ Preparing native dependencies
 ✖ Finalizing package
 ◼ Running postPackage hook
◼ Running preMake hook
◼ Making distributables
◼ Running postMake hook
(node:22335) ExperimentalWarning: CommonJS module /home/samira/Documentos/Proyectos/EleSky/node_modules/@electron-forge/core/helper/dynamic-import.js is loading ES Module /home/samira/Documentos/Proyectos/EleSky/forge.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:22335) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
❯ 
❯ sudo yarn make
[sudo] senha para samira: 
yarn run v1.22.22
warning ../../../package.json: No license field
$ electron-forge make
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
 › Making for the following targets: ,
✔ Running package command
 ✔ Preparing to package application
 ✔ Running packaging hooks
 ✔ Running generateAssets hook
 ✔ Running prePackage hook
 ✔ Packaging application
 ✔ Packaging for x64 on linux [25s]
 ✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
 ✖ Making a deb distributable for linux/x64
 ✖ Making a rpm distributable for linux/x64
 › Command failed with a non-zero return code (1):
 rpmbuild -bb /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/SPECS/elesky.spec --target
 x86_64-none-linux --define _topdir /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64
 Executando (%mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.0UyVBr
 Executando (%install): /bin/sh -e /var/tmp/rpm-tmp.OZwCIL
 RPM build errors:
 Construindo plataformas de destino: x86_64-none-linux
 Construindo para o destino x86_64-none-linux
 + umask 022
 + cd /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
 + test -d /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w
 /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
 + /usr/bin/rm -rf /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
 + /usr/bin/mkdir -p /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
 + /usr/bin/mkdir -p
 /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/SPECPARTS
 + RPM_EC=0
 ++ jobs -p
 + exit 0
 + umask 022
 + cd /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
 + /usr/bin/rm -rf
 /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT
 + /usr/bin/mkdir -p /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
 + /usr/bin/mkdir
 /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT
 + mkdir -p
 /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT/usr/
 + cp -r 'usr/*'
 /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT/usr/
 cp: cannot stat 'usr/*': No such file or directory
 erro: Status de saída de /var/tmp/rpm-tmp.OZwCIL inválido (%install)
 Status de saída de /var/tmp/rpm-tmp.OZwCIL inválido (%install)
◼ Running postMake hook
(node:22393) ExperimentalWarning: CommonJS module /home/samira/Documentos/Proyectos/EleSky/node_modules/@electron-forge/core/helper/dynamic-import.js is loading ES Module /home/samira/Documentos/Proyectos/EleSky/forge.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
(node:22393) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
An unhandled rejection has occurred inside Forge:
Error: Command failed with a non-zero return code (1):
rpmbuild -bb /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/SPECS/elesky.spec --target x86_64-none-linux --define _topdir /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64
Executando (%mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.0UyVBr
Executando (%install): /bin/sh -e /var/tmp/rpm-tmp.OZwCIL
RPM build errors:
Construindo plataformas de destino: x86_64-none-linux
Construindo para o destino x86_64-none-linux
+ umask 022
+ cd /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
+ test -d /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
+ /usr/bin/rm -rf /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
+ /usr/bin/mkdir -p /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
+ /usr/bin/mkdir -p /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/SPECPARTS
+ RPM_EC=0
++ jobs -p
+ exit 0
+ umask 022
+ cd /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
+ /usr/bin/rm -rf /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT
+ /usr/bin/mkdir -p /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build
+ /usr/bin/mkdir /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT
+ mkdir -p /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT/usr/
+ cp -r 'usr/*' /tmp/electron-installer--22393-OTQSFmZtv887/elesky_1.0.0_x86_64/BUILD/elesky-1.0.0-build/BUILDROOT/usr/
cp: cannot stat 'usr/*': No such file or directory
erro: Status de saída de /var/tmp/rpm-tmp.OZwCIL inválido (%install)
 Status de saída de /var/tmp/rpm-tmp.OZwCIL inválido (%install)
at ChildProcess.<anonymous> (/home/samira/Documentos/Proyectos/EleSky/node_modules/electron-installer-redhat/node_modules/@malept/cross-spawn-promise/dist/src/index.js:99:24)
 at ChildProcess.emit (node:events:507:28)
 at ChildProcess.emit (node:domain:489:12)
 at maybeClose (node:internal/child_process:1101:16)
 at ChildProcess._handle.onexit (node:internal/child_process:305:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I can't find any solution, tried updated yay, updated node, updated electron update EVERYTHING and nothing seems to help. First post here using stackoverflow too, sorry for any mistake on how this page works (I alredy looked at information page). Thanks!

Update all packages; use yarn and npm; using sudo to build

Expected to get a sucessfully build with electron forge

following: https://www.electronjs.org/docs/latest/tutorial/tutorial-packaging

asked Oct 28, 2024 at 0:13

1 Answer 1

0

Solution: You can only build in electron for the actual operation system you are, so, if you want to build for rpm and deb, need to be on ubuntu or fedora for example, if you want to build on windows, need to be on windows, sadly...

answered Oct 28, 2024 at 15:49
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.