Trying to execute lerna run --parallel on a set of packages

Viewed 7709

I am using lerna to manage my mono repo.

I'd like to run a command in parallel towards a set of packages.

I tried the following but can't get it working:

lerna run start --parallel packages1 packages2
lerna run start --parallel --scope packages1 packages2
lerna run start --scope "packages1 packages2" --parallel

It doesn't execute "run start" on my scope but on all the packages I have.

What is the right syntax to define the scope? Couldn't find anything in the documentation for that.

Thanks.

3 Answers
lerna run start --parallel --scope packages1 --scope packages2

should work.

According to their docs,

lerna run start --parallel --scope packages*

should also work, assuming you don't have a packages3 and packages4 that you don't want to run.

Did You specify the pathes of your packages in lerna.json ? Example:

{
  "packages": [
    "packages/*",
    "package1",
    "package2"
  ],
  "npmClient": "yarn",
  "version": "0.0.0"
}

Here for more informations

lerna run start --parallel '{*/packge,*/packge2,*/package3,*/package4,*/package5}'
Related