4

I've tried electron-builder and electron-packager, and I get this Error

Error: Command failed: codesign --verify --deep --strict --verbose=2

I don't need it to be code signed or the app store, I just need it to run on my computer.

build

"build":  "electron-packager ./public --app-version 1.4.3 --platform darwin --icon ./public/icon.icns --out ./dist --overwrite"

I've tried electron packager and electron builder.

3 Answers 3

4

You should follow this guide of Code Signing if you are developing mac application.

But if you want to Disable Code Signing During the Build Process on macOS

Run this command in your terminal:

export CSC_IDENTITY_AUTO_DISCOVERY=false

Hope this will solve your problem.

2

I'm not seeing the problem in what you posted. These are the cmds I use for electron-packager - "package-mac", "package-win". Maybe they will help.

Electron-builder use "pack" and "dist" and I have not included the associated scripts for those.

"scripts": {
    "start": "APP_DEV=true electron .",
    "package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --asar --ignore=/dist --ignore=/build --prune=true --out=release-builds",
    "package-win": "electron-packager . --overwrite --platform=win32 --arch=ia32 --asar --ignore=/dist --ignore=/build --prune=true --out=release-builds",
    "postinstall": "install-app-deps",
    "pack": "build --dir",
    "dist": "build -mw"
  },
2
  • That’s what I thought, but I keep getting that error no matter what I do Commented Mar 31, 2019 at 13:58
  • Added build script Commented Mar 31, 2019 at 14:34
1

If you are using electron-builder to build the application in MAC, you can simply disable the code signing by adding -c.mac.identity=null to your electron-builder params as follows.

electron-builder --mac --config -c.mac.identity=null

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.