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

WIP: Relates to #281. Partly fixes yarn electron error. Error with sed running fixElectronBug script remains #283

Closed
wants to merge 2 commits into from

Conversation

ltfschoen
Copy link
Contributor

Steps followed:

  • Clone repo:
git clone https://github.com/paritytech/fether;
cd ./fether;
  • Update Yarn and Copyfiles (for running script):
npm install --global yarn;
brew upgrade yarn;
npm install copyfiles -g;
  • Upgrade to Babel 7
npx babel-upgrade --write
cd packages/fether-ui && npx babel-upgrade --write;
cd ../packages/fether-electron && npx babel-upgrade --write;
cd ../packages/fether-electron && npx babel-upgrade --write;
  • Install dependencies:
yarn install;
  • Run
yarn electron;
  • Error due to sed
lerna ERR! build Errored while running script in 'fether'
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: yarn run build
lerna ERR! sed: -e expression #1, char 7: missing command
lerna ERR! error Command failed with exit code 1.
lerna ERR! $ copyfiles -u 2 "../fether-react/build/**/*" static/ && "./scripts/fixElectronBug.sh"
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR!
lerna ERR!     at Promise.all.then.arr (/Users/scon/code/src/paritytech/fether/node_modules/lerna/node_modules/execa/index.js:236:11)
{ Error: Command failed: yarn run build
sed: -e expression #1, char 7: missing command
error Command failed with exit code 1.
$ copyfiles -u 2 "../fether-react/build/**/*" static/ && "./scripts/fixElectronBug.sh"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    at Promise.all.then.arr (/Users/scon/code/src/paritytech/fether/node_modules/lerna/node_modules/execa/index.js:236:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 1,
  killed: false,
  stdout:
   '$ copyfiles -u 2 "../fether-react/build/**/*" static/ && "./scripts/fixElectronBug.sh"\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n',
  stderr:
   'sed: -e expression #1, char 7: missing command\nerror Command failed with exit code 1.\n',
  failed: true,
  signal: null,
  cmd: 'yarn run build',
  timedOut: false,
  exitCode: 1 }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

…d running fixElectronBug script remains

Steps followed:

* Clone repo:
```
git clone https://github.com/paritytech/fether;
cd ./fether;
```

* Update Yarn and Copyfiles (for running script):
```
npm install --global yarn;
brew upgrade yarn;
npm install copyfiles -g;
```

* Upgrade to Babel 7
```
npx babel-upgrade --write
cd packages/fether-ui && npx babel-upgrade --write;
cd ../packages/fether-electron && npx babel-upgrade --write;
cd ../packages/fether-electron && npx babel-upgrade --write;
```

* Install dependencies:
```
yarn install;
```

* Run
```
yarn electron;
```

* Error due to `sed`

```
lerna ERR! build Errored while running script in 'fether'
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: yarn run build
lerna ERR! sed: -e expression #1, char 7: missing command
lerna ERR! error Command failed with exit code 1.
lerna ERR! $ copyfiles -u 2 "../fether-react/build/**/*" static/ && "./scripts/fixElectronBug.sh"
lerna ERR! info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR!
lerna ERR!     at Promise.all.then.arr (/Users/scon/code/src/paritytech/fether/node_modules/lerna/node_modules/execa/index.js:236:11)
{ Error: Command failed: yarn run build
sed: -e expression #1, char 7: missing command
error Command failed with exit code 1.
$ copyfiles -u 2 "../fether-react/build/**/*" static/ && "./scripts/fixElectronBug.sh"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    at Promise.all.then.arr (/Users/scon/code/src/paritytech/fether/node_modules/lerna/node_modules/execa/index.js:236:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 1,
  killed: false,
  stdout:
   '$ copyfiles -u 2 "../fether-react/build/**/*" static/ && "./scripts/fixElectronBug.sh"\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n',
  stderr:
   'sed: -e expression #1, char 7: missing command\nerror Command failed with exit code 1.\n',
  failed: true,
  signal: null,
  cmd: 'yarn run build',
  timedOut: false,
  exitCode: 1 }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
@parity-cla-bot
Copy link
Collaborator

It looks like @ltfschoen signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

['@babel/preset-stage-0', { decoratorsLegacy: true }]
]
plugins: [
// Stage 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stage-0 includes everything here, why only include some?

```bash
npm install --global yarn;
brew upgrade yarn;
npm install copyfiles -g;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copyfiles is not needed as a global dependency


```bash
npm install --global yarn;
brew upgrade yarn;
Copy link
Collaborator

@amaury1093 amaury1093 Dec 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a mention to require yarn 1.4.2 above, and that is enough imo. A link to yarn website could be good too.

But the actually command to install yarn, I'd like to avoid. Moreover, you're installing yarn twice here, and both installs could actually give different versions of yarn.

@@ -62,6 +62,8 @@
"rxjs": "^6.2.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using CRA to manage all these dependencies

@@ -41,7 +41,22 @@
"@babel/core": "^7.0.0-beta.49",
"@babel/preset-env": "^7.0.0-beta.49",
"@babel/preset-react": "^7.0.0-beta.49",
"@babel/preset-stage-0": "^7.0.0-beta.49",
"@babel/plugin-proposal-class-properties": "^7.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stage-0 includes everything below

@ltfschoen
Copy link
Contributor Author

Closing as not necessary. Resolved by #286

@ltfschoen ltfschoen closed this Dec 13, 2018
@Tbaut Tbaut deleted the luke-281-build-error branch April 1, 2019 22:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants