Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Update to Electron 4 #309

Closed
amaury1093 opened this issue Dec 19, 2018 · 5 comments
Closed

Update to Electron 4 #309

amaury1093 opened this issue Dec 19, 2018 · 5 comments

Comments

@amaury1093
Copy link
Collaborator

https://electronjs.org/blog/electron-3-0

@ltfschoen
Copy link
Contributor

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

@ltfschoen
Copy link
Contributor

@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 " > [email protected]" has unmet peer dependency "eslint@>= 4.12.1".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.6.1".
warning " > [email protected]" has unmet peer dependency "react@^16.4.0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > @parity/[email protected]" has incorrect peer dependency "rxjs@~6.2.2".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > @parity/[email protected]" has incorrect peer dependency "rxjs@~6.2.2".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > [email protected]" has unmet peer dependency "prop-types@^15.6.0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > [email protected]" has unmet peer dependency "prop-types@^15.6.0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-react > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-f724aaed-c014-4448-9d98-bb1a68c93f31 > fether-ui > [email protected]" 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/[email protected]" 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/[email protected]" has unmet peer dependency "electron@^4.0.0".
@parity/electron: warning " > @parity/[email protected]" has unmet peer dependency "rxjs@~6.2.2".
@parity/electron: warning " > @parity/[email protected]" has unmet peer dependency "rxjs@~6.2.2".
@parity/abi: [4/5] Linking dependencies...
@parity/abi: warning " > @parity/[email protected]" has unmet peer dependency "electron@^4.0.0".
@parity/abi: warning " > @parity/[email protected]" has unmet peer dependency "rxjs@~6.2.2".
@parity/abi: warning " > @parity/[email protected]" 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/[email protected]" has unmet peer dependency "electron@^4.0.0".
warning " > @parity/[email protected]" has unmet peer dependency "rxjs@~6.2.2".
warning " > @parity/[email protected]" 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'

ltfschoen added a commit that referenced this issue Jan 9, 2019
Help...
```
scon @ ~/code/src/paritytech/fether - [luke-309-electron-3] $ yarn; yarn build
yarn install v1.12.3
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning " > [email protected]" has unmet peer dependency "eslint@>= 4.12.1".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.6.1".
warning " > [email protected]" has unmet peer dependency "react@^16.4.0".
warning "workspace-aggregator-21ff8a39-b153-439b-af1a-2c9e4c694eb4 > fether-react > [email protected]" has unmet peer dependency "prop-types@^15.6.0".
warning "workspace-aggregator-21ff8a39-b153-439b-af1a-2c9e4c694eb4 > fether-react > [email protected]" has unmet peer dependency "prop-types@^15.6.0".
warning "workspace-aggregator-21ff8a39-b153-439b-af1a-2c9e4c694eb4 > fether-ui > [email protected]" has unmet peer dependency "react-dom@>=0.14.0 <= 16".
warning "workspace-aggregator-21ff8a39-b153-439b-af1a-2c9e4c694eb4 > fether-react > @babel/plugin-proposal-decorators > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-21ff8a39-b153-439b-af1a-2c9e4c694eb4 > fether-react > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "workspace-aggregator-21ff8a39-b153-439b-af1a-2c9e4c694eb4 > fether-react > @babel/plugin-proposal-decorators > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0".
[5/5] 📃  Building fresh packages...
[6/14] ⠐ @parity/light.js
[2/14] ⠐ @parity/electron
[7/14] ⠐ @parity/light.js-react
[4/14] ⠐ @parity/api
error /Users/scon/code/src/paritytech/fether/node_modules/@parity/light.js: Command failed.
Exit code: 1
Command: yarn build
Arguments:
Directory: /Users/scon/code/src/paritytech/fether/node_modules/@parity/light.js
Output:
yarn run v1.12.3
$ lerna exec yarn build --stream
lerna notice cli v3.10.1
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/abi: [3/5] Fetching packages...
@parity/electron: [3/5] Fetching packages...
@parity/abi: Error: ENFILE: file table overflow, open '/Users/scon/code/src/paritytech/fether/node_modules/@parity/light.js/packages/abi/package.json'
@parity/abi:     at Object.openSync (fs.js:450:3)
@parity/abi:     at Object.readFileSync (fs.js:350:35)
@parity/abi:     at onUnexpectedError (/usr/local/Cellar/yarn/1.12.3/libexec/lib/cli.js:91337:106)
@parity/abi:     at /usr/local/Cellar/yarn/1.12.3/libexec/lib/cli.js:91447:9
@parity/electron: Error: ENFILE: file table overflow, open '/Users/scon/code/src/paritytech/fether/node_modules/@parity/light.js/packages/electron/package.json'
@parity/electron:     at Object.openSync (fs.js:450:3)
@parity/electron:     at Object.readFileSync (fs.js:350:35)
@parity/electron:     at onUnexpectedError (/usr/local/Cellar/yarn/1.12.3/libexec/lib/cli.js:91337:106)
@parity/electron:     at /usr/local/Cellar/yarn/1.12.3/libexec/lib/cli.js:91447:9
@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'

yarn run v1.12.3
$ lerna run build
lerna notice cli v3.10.1
lerna info Executing command in 3 packages: "yarn run build"
lerna info run Ran npm script 'build' in 'fether-ui' in 4.0s:
$ rimraf lib
$ babel src --out-dir lib
🎉  Successfully compiled 39 files with Babel.
lerna ERR! yarn run build exited 1 in 'fether-react'
lerna ERR! yarn run build stdout:
$ npm-run-all build-*
$ node-sass-chokidar src/ -o src/
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run build stderr:
/Users/scon/code/src/paritytech/fether/node_modules/node-sass/lib/binding.js:13
      throw new Error(errors.unsupportedEnvironment());
      ^

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (67)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.9.0
    at module.exports (/Users/scon/code/src/paritytech/fether/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/Users/scon/code/src/paritytech/fether/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/scon/code/src/paritytech/fether/node_modules/node-sass-chokidar/bin/node-sass-chokidar:18:9)
error Command failed with exit code 1.
ERROR: "build-css" exited with 1.
error Command failed with exit code 1.

lerna ERR! yarn run build exited 1 in 'fether-react'
error Command failed with exit code 1.
```
@ltfschoen ltfschoen changed the title Update to Electron 3 Update to Electron 4 Jan 13, 2019
@ltfschoen
Copy link
Contributor

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

@amaury1093
Copy link
Collaborator Author

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.

@Tbaut Tbaut added this to the 0.4 milestone Jan 23, 2019
amaury1093 added a commit that referenced this issue Feb 4, 2019
chore: Relates to #309. Update to Electron v4.0.1
@amaury1093
Copy link
Collaborator Author

Closed by #352

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

No branches or pull requests

3 participants