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

Unable to build on macOS #281

Closed
ltfschoen opened this issue Dec 12, 2018 · 2 comments
Closed

Unable to build on macOS #281

ltfschoen opened this issue Dec 12, 2018 · 2 comments

Comments

@ltfschoen
Copy link
Contributor

I followed the installation instructions on macOS 10.4 (Mojave) and ran the following commands:

$ git clone https://github.com/paritytech/fether;
$ cd ./fether;
$ npm install --global yarn;
$ brew upgrade yarn;
$ yarn --version
1.12.3

$ yarn install;
~/code/src/paritytech/fether - [master] $ yarn electron;
yarn run v1.12.3
$ yarn build
$ lerna run build
lerna info version 2.11.0
lerna ERR! build Errored while running script in 'fether-ui'
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: yarn run build
lerna ERR! { Error: Cannot find module '@babel/plugin-proposal-class-properties' from '/Users/me/code/src/paritytech/fether/packages/fether-ui'
lerna ERR!     at Function.module.exports [as sync] (/Users/me/code/src/paritytech/fether/node_modules/resolve/lib/sync.js:43:15)
lerna ERR!     at resolveStandardizedName (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
lerna ERR!     at resolvePlugin (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:54:10)
lerna ERR!     at loadPlugin (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:62:20)
lerna ERR!     at createDescriptor (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
lerna ERR!     at items.map (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:109:50)
lerna ERR!     at Array.map (<anonymous>)
lerna ERR!     at createDescriptors (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
lerna ERR!     at createPluginDescriptors (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
lerna ERR!     at plugins (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:40:19) code: 'MODULE_NOT_FOUND' }
lerna ERR! error Command failed with exit code 1.
lerna ERR! $ rimraf lib
lerna ERR! $ babel src --out-dir lib
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/me/code/src/paritytech/fether/node_modules/lerna/node_modules/execa/index.js:236:11)
{ Error: Command failed: yarn run build
{ Error: Cannot find module '@babel/plugin-proposal-class-properties' from '/Users/me/code/src/paritytech/fether/packages/fether-ui'
    at Function.module.exports [as sync] (/Users/me/code/src/paritytech/fether/node_modules/resolve/lib/sync.js:43:15)
    at resolveStandardizedName (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:101:31)
    at resolvePlugin (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:54:10)
    at loadPlugin (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:62:20)
    at createDescriptor (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
    at items.map (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:109:50)
    at Array.map (<anonymous>)
    at createDescriptors (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
    at createPluginDescriptors (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
    at plugins (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:40:19) code: 'MODULE_NOT_FOUND' }
error Command failed with exit code 1.
$ rimraf lib
$ babel src --out-dir lib
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    at Promise.all.then.arr (/Users/me/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:
   '$ rimraf lib\n$ babel src --out-dir lib\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n',
  stderr:
   '{ Error: Cannot find module \'@babel/plugin-proposal-class-properties\' from \'/Users/me/code/src/paritytech/fether/packages/fether-ui\'\n    at Function.module.exports [as sync] (/Users/me/code/src/paritytech/fether/node_modules/resolve/lib/sync.js:43:15)\n    at resolveStandardizedName (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:101:31)\n    at resolvePlugin (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:54:10)\n    at loadPlugin (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/files/plugins.js:62:20)\n    at createDescriptor (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:154:9)\n    at items.map (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:109:50)\n    at Array.map (<anonymous>)\n    at createDescriptors (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:109:29)\n    at createPluginDescriptors (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)\n    at plugins (/Users/me/code/src/paritytech/fether/node_modules/@babel/core/lib/config/config-descriptors.js:40:19) code: \'MODULE_NOT_FOUND\' }\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.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ltfschoen added a commit that referenced this issue Dec 12, 2018
…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.
```
@amaury1093
Copy link
Collaborator

Can you try:

cd /path/to/fether
rm -rf node_modules
yarn install
cd packages/fether-ui
yarn build

@ltfschoen
Copy link
Contributor Author

Closing as fixed in #286

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

2 participants