Update: Based on the comment, I think I now understand whats happening. If you have build dependencies, they should sit in the same thread not concurrent threads, i.e. they should sequentially build.
However, you can still try it.. using the --noClean
option in your build, it will
not remove the dist folders! Then your parallel build will run.
Three settings: I would configure/double check (you didn't list your package.json
) , so that lerna
knows what order to follow
- First get your list in correct order for your
peerDependencies
- Put those in the
devDependencies
- of a given leaf
package.json
,
...The globs defined are relative to the directory that lerna.json lives in, which is usually the repository root. The only restriction is that you can't directly nest package locations, but this is a restriction shared by "normal" npm packages as well. And so... leaf packages under packages/* is considered a "best-practice"
Finally the topological order will then be user by lerna run
in the build you can force it to include the dependencies --include-dependencies
/ or --include-dependents
flag as needed, like so
Workaround option 2: for now to get past you can do...
lerna run build --concurrency 1
parallel
doesn't guarantee the order of the build processes. – DecomposedC
but never watchingA
andB
since the watch task ofC
never completes – AriusC
first and then all the rest. Another solution is to be sure dist does not gets removed when on build but event then initially there is no dist so build needs to be done before watch. – Arius--stream
, but completely disregards concurrency and topological sorting, running a given command or script immediately in all matching packages with prefixed streaming output." – Decomposed