stakwork / sphinx-win-linux-desktop

MIT License
49 stars 13 forks source link

Arch Linux build error on "npm run build" #153

Open dmp1ce opened 3 years ago

dmp1ce commented 3 years ago

Documenting the error when trying to build the desktop application.

$ npm run build

> sphinx@0.1.0 build
> react-app-rewired build

Creating an optimized production build...
Failed to compile.

/home/david/Workspace/sphinx-android/node_modules/@react-navigation/drawer/lib/typescript/src/index.d.ts
TypeScript error in /home/david/Workspace/sphinx-android/node_modules/@react-navigation/drawer/lib/typescript/src/index.d.ts(22,1):
Declaration or statement expected.  TS1128

    20 |  * Types
    21 |  */
  > 22 | export type { DrawerNavigationOptions, DrawerNavigationProp, DrawerScreenProps, DrawerContentOptions, DrawerContentComponentProps, } from './types';
       | ^
    23 | 
Evanfeenstra commented 3 years ago

make sure to follow the directions in the readme https://github.com/stakwork/sphinx-android#development

dmp1ce commented 3 years ago

I got a little further, but failed building with yarn.

$ yarn && yarn dist:linux
yarn install v1.22.10
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
success Already up-to-date.
$ jetify
Jetifier found 1837 file(s) to forward-jetify. Using 8 workers...
Done in 3.48s.
yarn run v1.22.10
$ ./node_modules/.bin/electron-builder --linux
  • electron-builder  version=22.10.5 os=5.12.3-arch1-1
  • loaded configuration  file=package.json ("build" field)
  • loaded parent configuration  preset=react-cra
  • writing effective config  file=dist/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=bufferutil@4.0.3, electron-deeplink@1.0.6, keytar@6.0.1, mcrypt@0.1.17, realm@10.2.0, utf-8-validate@5.0.4 platform=linux arch=x64
  • install prebuilt binary  name=keytar version=6.0.1 platform=linux arch=x64
  • rebuilding native dependency  name=bufferutil version=4.0.3
  • rebuilding native dependency  name=electron-deeplink version=1.0.6
  • rebuilding native dependency  name=mcrypt version=0.1.17
  • rebuilding native dependency  name=realm version=10.2.0
  • rebuilding native dependency  name=utf-8-validate version=5.0.4
  • packaging       platform=linux arch=x64 electron=9.4.4 appOutDir=dist/linux-unpacked
  • Unpacking electron zip  zipPath=undefined
  ⨯ editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.  stackTrace=
                                                                                                          Error: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
                                                                                                              at new Errlop (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:317:21)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                          ↳ Error: editions-autoloader-none-suitable: Unable to determine a suitable edition, as none were suitable.
                                                                                                              at new Errlop (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:327:19)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138: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 (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:301:25)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138: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 (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:301:25)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138: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 (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:301:25)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138: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 (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:301:25)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138: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 (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:301:25)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                          ↳ Error: editions-autoloader-edition-incompatible: The edition [TypeScript source code with Import for modules] is not compatible with this environment.
                                                                                                              at new Errlop (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at isCompatibleEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:252:19)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:287:4)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                          ↳ Error: editions-autoloader-invalid-engines: The edition had no engines to compare against the environment
                                                                                                              at new Errlop (/home/david/Workspace/sphinx-android/node_modules/errlop/edition-es5/index.js:61:18)
                                                                                                              at Object.errtion (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/util.js:23:14)
                                                                                                              at isCompatibleEngines (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:183:19)
                                                                                                              at isCompatibleEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:250:10)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:287:4)
                                                                                                              at determineEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:312:12)
                                                                                                              at solicitEdition (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:350:16)
                                                                                                              at Object.requirePackage (/home/david/Workspace/sphinx-android/node_modules/editions/edition-es5/index.js:364:9)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/istextorbinary/index.cjs:4:38)
                                                                                                              at Module._compile (node:internal/modules/cjs/loader:1109:14)
                                                                                                              at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
                                                                                                              at Module.load (node:internal/modules/cjs/loader:989:32)
                                                                                                              at Function.Module._load (node:internal/modules/cjs/loader:829:14)
                                                                                                              at Module.require (node:internal/modules/cjs/loader:1013:19)
                                                                                                              at require (node:internal/modules/cjs/helpers:93:18)
                                                                                                              at Object.<anonymous> (/home/david/Workspace/sphinx-android/node_modules/app-builder-lib/electron-osx-sign/util.js:135:22)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
dmp1ce commented 3 years ago

Fixed by updating electron-builder.

diff --git a/package.json b/package.json
index 3a46df0..e2bc65b 100644
--- a/package.json
+++ b/package.json
@@ -222,7 +222,7 @@
     "babel-plugin-transform-remove-console": "^6.9.4",
     "customize-cra": "^1.0.0",
     "electron": "^9.2.0",
-    "electron-builder": "^22.7.0",
+    "electron-builder": "^22.11.0",
     "jetifier": "~1.6.4",
     "metro-react-native-babel-preset": "^0.59.0",
     "mocha": "^8.2.1",

I will work on a PR.

ralyodio commented 4 months ago

can we get an official aur package for sphinx-desktop?