Failed to parse file .jsx with Unexpected character '@'

  • sonarqube: using
  • CI system used: gitlab
  • Scanner command used when applicable:
  • Languages of the repository: javascript, typescript
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
Failed to parse file [EmptyCache.jsx] at line 10: Unexpected character '@'
  • sonar-scanner: it is from docker image (sonarsource/sonar-scanner-cli:latest)
/ sonar-scanner -v
INFO: Scanner configuration file: /opt/sonar-scanner/conf/
INFO: Project root configuration file: /usr/src/
INFO: SonarScanner
INFO: Java 11.0.6 AdoptOpenJDK (64-bit)
INFO: Linux 4.19.76-linuxkit amd64
  • Failed line
export default class EmptyCache extends Component {
  • Current plugin version from debug output
16:55:35.060 DEBUG:   * JavaScript/TypeScript Code Quality and Security (javascript)

Does anyone work around the error? I have no control over the plugin version since I am using It seems that the plugin version is supposed to work with javascript decorators.

Thanks for any tips.

Hello @bkim.finxact,

Currently, the parsers we used under the hood for our analyser are not able to parse decorators, which are not part of JavaScript standard yet. Still, we can configure them to support such a feature. I created this ticket in that regard.


1 Like

Yassin, thank you very much for following up. I will follow the ticket.