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.

Mac build failing with spawn hdiutil ENOENT

See original GitHub issue
  • electron: 1.4.3
  • electron-builder: 7.11.4
  • build platform: linux
  • target platform: mac

Trying to build my trial ‘hello world’ app for Mac, I get the following error:

> electron-koa-hello-world@0.0.0 build .../electron-koa-app
> build "--mac" "--x64"

Skip app dependencies rebuild because platform is different
Packaging for platform darwin x64 using electron 1.4.3 to dist/mac

Creating DMG
Creating MacOS zip
Error: Exit code: ENOENT. spawn hdiutil ENOENT
    at .../electron-koa-app/node_modules/electron-builder/src/util/util.ts:102:16
    at exithandler (child_process.js:213:5)
    at ChildProcess.errorhandler (child_process.js:225:5)
    at emitOne (events.js:96:13)
    at ChildProcess.emit (events.js:188:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From previous event:
    at Object.exec (.../electron-koa-app/node_modules/electron-builder/src/util/util.ts:80:3)
    at DmgTarget.<anonymous> (.../electron-koa-app/node_modules/electron-builder/src/targets/dmg.ts:49:15)
    at next (native)
    at .../electron-koa-app/node_modules/graceful-fs/graceful-fs.js:99:16
    at .../electron-koa-app/node_modules/graceful-fs/graceful-fs.js:43:10
    at FSReqWrap.oncomplete (fs.js:123:15)
From previous event:
    at tsAwaiter (.../electron-koa-app/node_modules/electron-builder/src/util/awaiter.ts:10:47)
    at DmgTarget.build (.../electron-koa-app/node_modules/electron-builder/out/targets/dmg.js:20:16)
    at MacPackager.packageInDistributableFormat (.../electron-koa-app/node_modules/electron-builder/src/macPackager.ts:195:25)
    at nonMasPromise.doPack.then.then (.../electron-koa-app/node_modules/electron-builder/src/macPackager.ts:80:16)
From previous event:
    at MacPackager.<anonymous> (.../electron-koa-app/node_modules/electron-builder/src/macPackager.ts:79:10)
    at next (native)
From previous event:
    at tsAwaiter (.../electron-koa-app/node_modules/electron-builder/src/util/awaiter.ts:10:47)
    at Object.build (.../electron-koa-app/node_modules/electron-builder/out/builder.js:138:12)
    at Object.<anonymous> (.../electron-koa-app/node_modules/electron-builder/out/build-cli.js:23:11)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

Am I doing something wrong, or is there a bug?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
develarcommented, Oct 10, 2016

You can build mac dmg only on macOS. Please see https://github.com/LinusU/node-appdmg/issues/14#issuecomment-244538777

1reaction
develarcommented, Aug 22, 2017

@iMoses To avoid CLI arg, you can simply:

"mac": {
  "target": "tar.gz"
}

in the configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build Errror "spawn spctl ENOENT" on MAC OS X Slave that ...
I don't think it's an ideal solution for our problem, but it's at least a workaround. As we suggested, the problem is in...
Read more >
Building a Windows build on a MacOS - Error: spawn yarn ...
I'm on a 2015 MacBook Pro and for the life of me, I cannot see why I cannot make an .exe build (Windows)...
Read more >
How to fix this Error: spawn EACCES - Edward Beazer Blog
This error comes up when you don't have full permissions to the project folder. You want to run the chmod command in order...
Read more >
Programming lols
Anyway I needed to build my electron app for Mac so I could send this to ... spawn hdiutil ENOENT stackTrace= Error: spawn...
Read more >
658509 - Failure in spawning the process - Bugzilla@Mozilla
This error message "Process spawn failed" is not a Mozmill message, ... failed - Operation timed out We use hdiutil (on the Mac)...
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