Sonarqube-scanner|@sonar/scan has multiple binaries: sonar, sonar-scanner

We are installing and scanning our repo code with pnpx sonarqube-scanner and we also changed and validated with pnpx @sonar/scan. And from yesterday we started to get the following error

Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /opt/atlassian/pipelines/agent/build/.pnpm-store/v3
  Virtual store is at:             .pnpm-store/v3/tmp/dlx-431/.pnpm
 ERR_PNPM_DLX_MULTIPLE_BINS  Could not determine executable to run. @sonar/scan has multiple binaries: sonar, sonar-scanner
Try one of the following:
pnpm --package=@sonar/scan dlx sonar
pnpm --package=@sonar/scan dlx sonar-scanner
 

We saw that there’s a new version published yesterday. Could that be the reason for this breaking in the pipelines?

3 Likes

Instead of

pnpx sonarqube-scanner
 

we replaced the command with

pnpm --package=@sonar/scan dlx sonar-scanner
 

And this worked.

3 Likes

@Prakash_Somasundaram , thanks for the report. And the fix!

You are right, this is coming from yesterday’s release. Our Scanner dedicated to npm now comes with two binaries, as permitted by specification.

Your solution is actually the correct one. Can you mark your latest message as Solution, so that others that may encounter the issue can immediately find it?

Eric.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.