openethereum/fether

Update to Electron 4

Closed this issue ยท 5 comments

Electron 4 has been released now https://electronjs.org/releases

@amaurymartiny I tried updating from Electron v2.0.2 to Electron v4.0.0.

I've first updated paritytech/js-libs to Electron 4 in this js-libs branch https://github.com/paritytech/js-libs/compare/luke-81-electron-4?expand=1.

I was able to get js-libs tests to pass, and it also built successfully export NPM_TOKEN=''; yarn test; yarn build. I used Node.js v10.11.0 (i.e. nvm use 10.11.0 since that is minimum required for Electron 4.

I then added the changes in that js-libs branch as a dependency to paritytech/fether by making the dependency changes shown in this fether branch https://github.com/paritytech/fether/compare/luke-309-electron-4?expand=1 to see if fether would still compile after updating it from Electron v2.0.2 to Electron v4.0.0.

I changed to the fether branch "luke-309-electron-4", switched to Node.js v10.11.0, and then tried to update the dependencies from the root directory by running yarn, however I encountered the below errors

Next step I was going to take was to raise an issue on the electron repo.

What do you think?

me @ ~/code/src/paritytech/fether - [luke-309-electron-4] $ nvm use v10.11.0
Now using node v10.11.0 (npm v6.4.1)
me @ ~/code/src/paritytech/fether - [luke-309-electron-4] $ yarn
yarn install v1.12.3
[1/5] ๐Ÿ”  Validating package.json...
[2/5] ๐Ÿ”  Resolving packages...
[3/5] ๐Ÿšš  Fetching packages...
[4/5] ๐Ÿ”—  Linking dependencies...
warning " > babel-eslint@10.0.1" has unmet peer dependency "eslint@>= 4.12.1".
warning " > fether-ui@0.1.2" has unmet peer dependency "prop-types@^15.6.1".
warning " > fether-ui@0.1.2" has unmet peer dependency "react@^16.4.0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > @parity/light.js@3.0.11" has incorrect peer dependency "rxjs@~6.2.2".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > @parity/light.js-react@3.0.11" has incorrect peer dependency "rxjs@~6.2.2".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > react-final-form@3.6.4" has unmet peer dependency "prop-types@^15.6.0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > react-final-form-listeners@1.0.1" has unmet peer dependency "prop-types@^15.6.0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > @babel/plugin-proposal-decorators@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-ui > semantic-ui-react@0.81.3" has unmet peer dependency "react-dom@>=0.14.0 <= 16".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > @babel/plugin-proposal-decorators > @babel/plugin-syntax-decorators@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
[5/5] ๐Ÿ“ƒ  Building fresh packages...
[6/11] โ ‚ secp256k1
[2/11] โ ‚ @parity/electron
[7/11] โ ‚ scrypt
[-/11] โ ‚ waiting...
error /Users/me/code/src/paritytech/fether/node_modules/@parity/electron: Command failed.
Exit code: 1
Command: yarn build
Arguments: 
Directory: /Users/me/code/src/paritytech/fether/node_modules/@parity/electron
Output:
yarn run v1.12.3
$ lerna exec yarn build --stream
lerna notice cli v3.8.0
lerna info Executing command in 6 packages: "yarn build"
@parity/abi: $ rimraf lib
@parity/electron: $ rimraf lib
@parity/abi: $ yarn && ./node_modules/.bin/tsc
@parity/electron: $ yarn && ./node_modules/.bin/tsc
@parity/abi: [1/5] Validating package.json...
@parity/abi: [2/5] Resolving packages...
@parity/electron: [1/5] Validating package.json...
@parity/electron: [2/5] Resolving packages...
@parity/electron: [3/5] Fetching packages...
@parity/abi: [3/5] Fetching packages...
@parity/electron: [4/5] Linking dependencies...
@parity/electron: warning " > @parity/electron@3.0.2" has unmet peer dependency "electron@^4.0.0".
@parity/electron: warning " > @parity/light.js-react@3.0.13" has unmet peer dependency "rxjs@~6.2.2".
@parity/electron: warning " > @parity/light.js@3.0.13" has unmet peer dependency "rxjs@~6.2.2".
@parity/abi: [4/5] Linking dependencies...
@parity/abi: warning " > @parity/electron@3.0.2" has unmet peer dependency "electron@^4.0.0".
@parity/abi: warning " > @parity/light.js-react@3.0.13" has unmet peer dependency "rxjs@~6.2.2".
@parity/abi: warning " > @parity/light.js@3.0.13" has unmet peer dependency "rxjs@~6.2.2".
@parity/electron: [5/5] Building fresh packages...
@parity/abi: [5/5] Building fresh packages...
@parity/abi: error /Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron: Command failed.
@parity/abi: Exit code: 1
@parity/abi: Command: node install.js
@parity/abi: Arguments: 
@parity/abi: Directory: /Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron
@parity/abi: Output:
@parity/abi: /Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron/install.js:49
@parity/abi:   throw err
@parity/abi:   ^
@parity/abi: Error: EEXIST: file already exists, symlink 'Versions/Current/Electron Framework' -> '/Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework'
@parity/abi: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@parity/abi: error Command failed with exit code 1.
@parity/abi: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn build exited 1 in '@parity/abi'
lerna ERR! yarn build stdout:
$ rimraf lib
$ yarn && ./node_modules/.bin/tsc
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn build stderr:
warning " > @parity/electron@3.0.2" has unmet peer dependency "electron@^4.0.0".
warning " > @parity/light.js-react@3.0.13" has unmet peer dependency "rxjs@~6.2.2".
warning " > @parity/light.js@3.0.13" has unmet peer dependency "rxjs@~6.2.2".
error /Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron
Output:
/Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron/install.js:49
  throw err
  ^

Error: EEXIST: file already exists, symlink 'Versions/Current/Electron Framework' -> '/Users/me/code/src/paritytech/fether/node_modules/@parity/electron/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework'
error Command failed with exit code 1.

lerna ERR! yarn build exited 1 in '@parity/abi'

Requires PR associated with this issue to get merged dilanx/craco#61

if the above PR doesn't get merged, we could always get back to https://github.com/timarney/react-app-rewired. cf relevant parts in #284.

Closed by #352