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.

Is possible to make "deb" and "rpm" on Mac OSX?

See original GitHub issue
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

I’m trying to use electron-forge make to distribute my application with Mac OSX High Sierra 10.13.3 (17D102).

I’m be able to make for “darwin” and “win32”, but I cant do it for “deb” and “rpm”.

For “darwin”, I just run electron-forge make --platform=darwin.

For “win32”, I installed wine and mono-mdk with homebrew, and then electron-forge make --platform=win32 --arch=ia32,x64.

For “linux”, I installed dpkg and rpm with homebrew, and then electron-forge make --platform=linux --arch=ia32,x64. But I receive this error:

$ electron-forge make --platform=linux --arch=ia32,x64
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: ia32,x64
✔ Preparing to Package Application for arch: ia32,x64
✔ Compiling Application
✔ Compiling Application
✔ Preparing native dependencies
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets:
✖ Making for target: deb - On platform: linux - For arch: ia32

An unhandled error has occurred inside Forge:
An error occured while making for target: deb
Cannot read property 'toString' of undefined
TypeError: Cannot read property 'toString' of undefined
    at spawn.then.catch.err (/Users/douglas/projetos/Electron/learning-electron/node_modules/electron-installer-debian/src/spawn.js:30:113)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

My package.json is like that:

{
  "name": "learning-electron",
  "productName": "learning-electron",
  "version": "1.0.0",
  "description": "My Electron application description",
  "main": "src/index.js",
  "scripts": {
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "run-s make:mac make:linux make:windows",
    "make:mac": "electron-forge make --platform=darwin",
    "make:linux": "electron-forge make --platform=linux --arch=ia32,x64",
    "make:windows": "electron-forge make --platform=win32 --arch=ia32,x64",
    "publish": "electron-forge publish",
    "lint": "eslint --cache --color --ext .jsx,.js src"
  },
  "keywords": [],
  "author": "dougl",
  "license": "MIT",
  "config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "dmg"
        ],
        "linux": [
          "deb",
          "rpm",
          "zip"
        ]
      },
      "electronPackagerConfig": {
        "packageManager": "yarn"
      },
      "electronWinstallerConfig": {
        "name": "learning_electron"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "learningelectron"
      }
    }
  },
  "dependencies": {
    "electron-compile": "6.4.2",
    "electron-devtools-installer": "2.2.3",
    "electron-squirrel-startup": "1.0.0",
    "react": "16.2.0",
    "react-dom": "16.2.0",
    "react-hot-loader": "3.1.3"
  },
  "devDependencies": {
    "babel-eslint": "8.2.2",
    "babel-plugin-transform-class-properties": "6.24.1",
    "babel-preset-es2015": "6.24.1",
    "babel-preset-react": "6.24.1",
    "electron-forge": "5.1.1",
    "electron-installer-debian": "0.8.0",
    "electron-installer-redhat": "0.5.0",
    "electron-prebuilt-compile": "1.8.2",
    "electron-wix-msi": "1.3.0",
    "eslint": "4.18.0",
    "eslint-config-airbnb": "16.1.0",
    "eslint-plugin-import": "2.8.0",
    "eslint-plugin-jsx-a11y": "6.0.3",
    "eslint-plugin-react": "7.7.0",
    "npm-run-all": "4.1.2"
  }
}

Here is the project that I am using for testing: https://github.com/douglasjunior/learning-electron

node v8.9.4
npm v5.6.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maleptcommented, Aug 13, 2019

This has been fixed in 6.0.0 beta 44.

0reactions
JensDeberghcommented, Aug 2, 2019

Hey there!

I’m having similar issues on 6.0.0-beta.43.

I tried running the make command on my macbook during lunch break and keep getting following error:

Screenshot 2019-08-02 at 13 55 30

I have both fakeroot and dpkg installed on machine.

I did notice that @electron-forge/make-deb has follow snippet of code on 6.0.0 ensuring it will never run on any other platform then linux.

https://github.com/electron-userland/electron-forge/blob/master/packages/maker/deb/src/MakerDeb.ts#L22

Is support dropped? Or did this just slip in?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is possible to make "deb" and "rpm" on Mac OSX? #436 - GitHub
To answer the question in your issue title: yes, it's possible to make .deb and .rpm packages on macOS. You're probably missing fakeroot ......
Read more >
How do you install .deb files in OSX? - Apple Community
You can, if you want, use MacPorts or FINK instead. Most of the Linux packages available as RPMs or Debian packages are also...
Read more >
Open a RPM on a Mac? - Unix & Linux Stack Exchange
I just want to unpackage this RPM so that I can view the source files underneath. Is it possible to unpackage a RPM...
Read more >
How can I build an RPM on my MacOS system? - Stack Overflow
You can install rpmbuild on MacOS using Homebrew package manager. brew install rpm. This installs a bunch of packages including rpmbuild ...
Read more >
How to Convert From RPM to DEB and DEB to RPM Package ...
In this article we will introduce you to alien, a tool that converts between different Linux package formats, with .rpm to .deb (and...
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