Mac App Store build failing with `Cannot find module '../dialog'`


#1

My packaged mas platform app is failing when I run it with an error of cannot find module '../dialog', but I’ve got no idea why when my darwin packaged app runs fine. It seems to run through my main.js, but fails never opens a window, errors and fails

Error: Cannot find module '../dialog'
    at Module._resolveFilename (module.js:543:15)
    at Function.Module._resolveFilename (/Users/david/my-app.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Object.get [as dialog] (/Users/david/my-app.app/Contents/Resources/electron.asar/browser/api/exports/electron.js:11:16)
    at process.<anonymous> (/Users/david/my-app.app/Contents/Resources/electron.asar/browser/init.js:54:31)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
    at process._fatalException (bootstrap_node.js:383:26)

As you can see, the error’s coming through from electron.asar (ie, Electron itself), not my code, but again only in electron-packager's mas platform option

I’m running Electron 2.0.6, with electron-packager 12.1.12