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.

macOS 12.3 (21E230) Exit code: ENOENT. spawn /usr/bin/python ENOENT

See original GitHub issue
    at /Users/xxx/web/xxx/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:406:5)
    at ChildProcess.errorhandler (node:child_process:418:5)
    at ChildProcess.emit (node:events:526:28)
    at ChildProcess.emit (node:domain:475:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Please upgrade electron-builder 23.02 +

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:28

github_iconTop GitHub Comments

31reactions
MarMuncommented, Sep 15, 2022

Temporary (and npm native) solution to this is npm overrides (requires npm >= v8):

package.json
{
 .
 .
 .
  "devDependencies": {
    "vue-cli-plugin-electron-builder": "^2.1.1"
  },
  "overrides": {
    "vue-cli-plugin-electron-builder": {
      "electron-builder": "^23.0.3"
    }
  }
}

After changing package.json, I did (there may be a less ‘brutal’ approach):

rm -rf node_modules
rm package-lock.json
npm install

result:

npm list electron-builder
foobar@1.0.0 /Users/me/Dev/foobar
└─┬ vue-cli-plugin-electron-builder@2.1.1
  └── electron-builder@23.0.3

Aaand build on mac os 12.3.1 works again 😃

9reactions
huzunjiecommented, Apr 2, 2022

There is a simple solution 😂:

To install python 2.7, And get the installation path (for example: /XXX/versions/2.7/bin/python);

Open “YourProjectPath/node_modules/dmg-builder/out/dmg.js”, find “/usr/bin/python”, replace with “/XXX/versions/2.7/bin/python”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exit code: ENOENT. spawn /usr/bin/python error after ... - GitHub
I recently updated my MacBook Air M1 (macOS Monterey) to 12.3 and started receiving this error when running "electron-builder": • electron- ...
Read more >
Create Electron dmg file macOS Monterey 12.3.1 - AppStudio
... dmg file Make Electron Appliction /usr/bin/python ENONET error. log ... Exit code: ENOENT. spawn /usr/bin/python ENOENT failedTask=build ...
Read more >
Python 2.7 is removed from macOS in version 12.3+ - Issuehunt
Apple states: "Python 2.7 was removed from macOS in this update. ... Exit code: ENOENT. spawn /usr/bin/python ENOENT failedTask=build stackTrace=Error: Exit ...
Read more >
macOS Monterey 12.3 will remove Python 2.7 (/usr/bin/python)
It appears that the code binary is a simple bash script, with the below contents: cat /usr/local/bin/code #!/usr/bin/env bash # # Copyright (c) ......
Read more >
Spawn enoent
macOS 12.3 (21E230) Exit code: ENOENT. spawn /usr/bin/python ENOENT ... This mimics the Node.js behavior. spawn yarn ENOENT This is because Yarn can't...
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