Search code examples
azure-devopsrush

rush rebuild specify projects order


I am using microsoft rush to build a mono-repo. I have to build two projects - tools-common and tools-backend tools-backend depends on tools-common. rush rebuild works fine on the local machine. But on azure devops, it tries to first build tools-backend and it fails for not finding tools-common.

My questions are.

  1. Why rush on azure devops fails to detect the order?
  2. How can I ensure that it picks up tools-common before tools-backend ?

Solution

  • I solved it by adding tools-common in devDependencies as well. Earlier it was in peerDependencies only. It seems that rush does not try to resolve peerDependencies. So if we have a local project, we should add it both in dev and peer dependencies.

    Why it worked on my local machine was it held copy of tools-common dist from previous run. It would not work on local either This is what I have found. But any better explanation is welcome.