Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests hangs on MacOS #2183

Closed
assapir opened this issue Jul 16, 2019 · 3 comments
Closed

Tests hangs on MacOS #2183

assapir opened this issue Jul 16, 2019 · 3 comments

Comments

@assapir
Copy link

assapir commented Jul 16, 2019

  1. Configure lerna as in my repo (www.github.com/meijin007/story-line)
  2. run on MacOS lerna run test.
    Expected: tests from both packages will run
    Actual: only one of them is running, and the other is hanged and time out on the CI

Note - for each package everything is running fine

lerna.json

{
  "name": "root",
  "private": true,
  "devDependencies": {
    "lerna": "^3.15.0"
  }
}

lerna-debug.log

➜  story-line git:(master) ✗ npx lerna run test --loglevel sill
lerna sill argv { _: [ 'run' ],
lerna sill argv   loglevel: 'sill',
lerna sill argv   lernaVersion: '3.15.0',
lerna sill argv   '$0': 'node_modules/.bin/lerna',
lerna sill argv   script: 'test' }
lerna notice cli v3.15.0
lerna verb rootPath /Users/assapir/private/story-line
lerna info Executing command in 2 packages: "npm run test"
lerna sill npmRunScript test [] story-line
lerna sill getExecOpts /Users/assapir/private/story-line/api undefined
lerna sill npmRunScript test [] ui
lerna sill getExecOpts /Users/assapir/private/story-line/ui undefined
<SOME TEST RESULTS FROM ONLY ONE PACKAGE>

Executable Version
lerna --version 3.15.0
npm --version 6.10.1
node --version v10.15.3
OS Version
MacOS 10.15 beta

To reproduce. maybe try to add MacOS to the TravisCI

@evocateur
Copy link
Member

I'm not sure why you're using Lerna, to be honest.

  • Only one "package" is actually public, the other is private (and your packages config is quite dangerous, it only needs to be ["api", "ui"] for the current structure).
  • lerna exec npm install isn't how you bootstrap lerna packages, you should call npx lerna bootstrap in your Travis config
  • I would suggest turning down the concurrency and streaming the output of your lerna run call: npx lerna run --stream --concurrency=1 test:ci

@assapir
Copy link
Author

assapir commented Jul 17, 2019

Hi @evocateur, thanks for your comments.
The reason I use Lerna is for easier maintenance of a monorepo, meaning to be able to run commands on both of the packages using a single command.
I will fix my configuration with your comments.

the stream option was allow me to notice where I have timeout in my tests. thanks!

@assapir assapir closed this as completed Jul 17, 2019
@allroundexperts
Copy link

Can you please elaborate why using lerna isn't a good idea for this specific use case?

I'm not sure why you're using Lerna, to be honest.

  • Only one "package" is actually public, the other is private (and your packages config is quite dangerous, it only needs to be ["api", "ui"] for the current structure).
  • lerna exec npm install isn't how you bootstrap lerna packages, you should call npx lerna bootstrap in your Travis config
  • I would suggest turning down the concurrency and streaming the output of your lerna run call: npx lerna run --stream --concurrency=1 test:ci

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

No branches or pull requests

3 participants