macintosh.js
macintosh.js copied to clipboard
Linux deb fails
Running macintosh.js on Ubuntu 20.04 it crashes while starting with the following output:
(node:201806) UnhandledPromiseRejectionWarning: Error: Cannot find module 'github-url-to-object' Require stack:
- /usr/lib/macintosh.js/resources/app/node_modules/update-electron-app/index.js
- /usr/lib/macintosh.js/resources/app/src/main/update.js
- /usr/lib/macintosh.js/resources/app/src/main/index.js
- at Module._resolveFilename (internal/modules/cjs/loader.js:961:15)
at Function.o._resolveFilename (electron/js2c/browser_init.js:257:919)
at Module._load (internal/modules/cjs/loader.js:844:27)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.
(/usr/lib/macintosh.js/resources/app/node_modules/update-electron-app/index.js:5:12) at Module._compile (internal/modules/cjs/loader.js:1145:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1166:10) at Module.load (internal/modules/cjs/loader.js:981:32) (node:201806) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:201806) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Same problem here...
cd /usr/lib/macintosh.js/resources/app/
sudo yarn add github-url-to-object
seems to fix that immediate issue.
After that, it seems stuck on "Loading emulator dependencies" without further errors (except Electron's autoUpdater does not support the 'linux' platform)
Oof, that's annoying. Sorry friends, I'll fix that.
For those on debian (buster) who don't have a js dev environment set up, you can use debian's yarn which is named yarnpkg:
sudo apt install yarnpkg
sudo yarnpkg add (..)
Here's a horror show for you: sudo macintosh.js --no-sandbox works like a charm. I'm sorry.
(Root cause is likely the FS image is written out to a directory a normal user cannot write to. Hence sudo being a bigger hammer but a bad idea.)
Stuck at emulator loading was probably fixed by #24