Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Failed to compile Flipper Desktop for M1 #2898

Open
lockieluke opened this issue Sep 22, 2021 · 6 comments
Open

Failed to compile Flipper Desktop for M1 #2898

lockieluke opened this issue Sep 22, 2021 · 6 comments

Comments

@lockieluke
Copy link

🐛 Bug Report

I tried to build Flipper Desktop for M1(arm64) but it failed.

/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61
		_this = _super.call(this, input.message || input) || this
                 ^
Error: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:317:21)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
↳ Error: editions-autoloader-none-suitable: Unable to determine a suitable edition, as none were suitable.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:327:19)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript source code made to be compatible with Deno] is not compatible with this environment.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:301:25)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for Node.js 12 || 14 || 15 with Import for modules] is not compatible with this environment.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:301:25)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 15 with Require for modules] is not compatible with this environment.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:301:25)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ESNext for Node.js 14 || 15 with Require for modules] is not compatible with this environment.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:301:25)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
↳ Error: editions-autoloader-edition-incompatible: editions-autoloader-edition-incompatible: The edition [TypeScript compiled against ES2019 for web browsers with Import for modules] is not compatible with this environment.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:301:25)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
↳ Error: editions-autoloader-edition-incompatible: The edition [TypeScript source code with Import for modules] is not compatible with this environment.
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at isCompatibleEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:252:19)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:287:4)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
↳ Error: editions-autoloader-invalid-engines: The edition had no engines to compare against the environment
    at new Errlop (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/errlop/edition-es5/index.js:61:18)
    at Object.errtion (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/util.js:23:14)
    at isCompatibleEngines (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:183:19)
    at isCompatibleEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:250:10)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:287:4)
    at determineEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:312:12)
    at solicitEdition (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:350:16)
    at Object.requirePackage (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/editions/edition-es5/index.js:364:9)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/istextorbinary/index.cjs:4:38)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/Users/sherlockluk/Desktop/flipper/desktop/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)

To Reproduce

Run yarn build --mac

Environment

M1 MacBook Air - building Flipper Desktop

@passy
Copy link
Member

passy commented Sep 23, 2021

From googling, this seems to be an issue with app-builder-lib. We're currently not on the latest version (I believe due to us also being behind on Electron). Could you check if upgrading app-builder-lib or electron-builder makes any difference?

@lockieluke
Copy link
Author

Script termnated. Error: spawn zip ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn zip',
  path: 'zip',
  spawnargs: [ '-qyr9', '../Flipper-mac.zip', 'Flipper.app' ]
}

It just builds it as an .app bundle instead of a zip because of the error above

@lockieluke
Copy link
Author

Flipper for Apple Silicon
Direct Download Link (Host: Gofile)

I built Flipper for arm64 without any modification except upgrading the libraries to make the build work. When I run it, it says:

image

@mweststrate
Copy link
Contributor

mweststrate commented Sep 23, 2021 via email

@colinbendell
Copy link

The root issue here is that the electron builder on an m1 puts the destination files in dist/mac-arm64 and not the expected dist/mac

@gaweki
Copy link

gaweki commented Nov 8, 2022

is there update for this? still have this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants