Update Tutorial for JS/TS projects Scanning

  • which versions are you using (SonarQube Community Build version 25.5.0.107428)
  • how is SonarQube deployed: zip
  • what are you trying to achieve: update the tutorial command to include project key in parameter
  • what have you tried so far to achieve this: I have forked and cloned sonar-webapp repo and updated the code locally after performing the necessary steps listed in the sonar-developer-toolset repository.

When scanning a JavaScript or TypeScript project using the SonarQube Community Build (version 25.5.0.107428), the instructions typically suggest installing an NPM package, followed by executing the following command:

sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.token=sqp_xxxxx

If you run the command as-is, it will fail — likely with an error saying you’re not authorized to analyze or create the project.

[ERROR] ScannerEngine: You’re not authorized to analyze this project or the project doesn’t exist on SonarQube and you’re not authorized to create it. Please contact an administrator.
[ERROR] Bootstrapper: An error occurred: Error: Scanner engine failed with code 1

The fix is straightforward: just add the missing project key. For example:

sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.projectKey=full-stack-fastapi-template -Dsonar.token=sqp_xxxxx

1 Like

I’ve created a pull request at the repository. Please do let me know if I’m missing something necessary as I don’t have much experience in contributing to projects. :eyes:

1 Like