Electron-builder error

An old version of Electron app issue. The app built a couple of years ago using:

  • Angular v5.2.0
  • Angular-CLI v1.6.4
  • Electron v1.7.8
  • Electron Builder v20.0.5
  • Node 10.15.0
  • NPM 6.4.1
  • node-gyp 3.8.0

It was last compiled in September 2019 but now when run npm i after cloning from the repo getting the following error on electron-builder. Running on Windows 10 and Visual Studio Code. I’ve got the same error on MacOS Catalina.

PS C:[Project\directory]> npm i
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade t

[projectname-version]-beta postinstall C:\Pinro\8track-player
electron-builder install-app-deps

• electron-builder version=20.0.5
• loaded configuration file=C:[project\directory]\electron-builder.json
Error: Application directory dist doesn’t exists
at C:[project\directory]\node_modules\electron-builder-lib\src\util\config.ts:140:13
From previous event:
at computeDefaultAppDirectory (C:[project\directory]\node_modules\electron-builder-lib\out\util\config.js:131:22)
at C:[project\directory]\node_modules\electron-builder\src\cli\install-app-deps.ts:52:78
at Generator.next ()
From previous event:
at installAppDeps (C:[project\directory]\node_modules\electron-builder\out\cli\install-app-deps.js:51:21)
at then (C:[project\directory]\node_modules\electron-builder\src\cli\cli.ts:48:33)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
From previous event:
at Object.args [as handler] (C:[project\directory]\node_modules\electron-builder\src\cli\cli.ts:48:33)
at Object.runCommand (C:[project\directory]\node_modules\electron-builder\node_modules\yargs\lib\command.js:235:44
at Object.parseArgs [as _parseArgs] (C:[project\directory]\node_modules\electron-builder\node_modules\yargs\yargs.
at Object.get [as argv] (C:[project\directory]\node_modules\electron-builder\node_modules\yargs\yargs.js:965:21)
at Object. (C:[project\directory]node_modules\electron-builder\src\cli\cli.ts:42:15)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [project-name-version]-beta postinstall: electron-builder install-app-deps
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [project-name-version]-beta postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:[Project directory]\AppData\Roaming\npm-cache_logs\2020-07-12T07_25_33_106Z-debug.log
PS C:[Project\directory]>