Nx (Monorepo) + Sonar + Github Actions not working

ALM: GitHub
CI: Github
Scanner command:

      - name: Analyze with SonarCloud
        uses: sonarsource/sonarcloud-github-action@master
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          args: >

Languages: Typescript
Error: Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration


  1. Creating and adding each new project (app/lib) manually to Sonarcloud.
  2. Do a manual run to bypass the problem.

Problem: within our monorepo the amount of libs and apps is growing quite rapidly. The problem is gennerally a new app/lib is introduced by a pullrequest. So far as i know Sonarcloud expects a run on a main branch before allowinng pull requests, which works great for non monorepo projects.


Welcome to the community!

Can you provide the full analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.