添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
谦逊的猴子  ·  2024 ...·  3 周前    · 
谈吐大方的楼房  ·  Setting a hostname ...·  6 月前    · 
风度翩翩的钢笔  ·  springboot-guide/docs/ ...·  9 月前    · 

Hello, I am having an error when running a pipeline in azure devops, the pipeline generates an error in the sonarqube prepare phase, I am using sonar version 5.18.3 (Latest), in the self-hosted agent I have node16.13.2 and I tried with version 18 getting the same error the, error is the following.

##[error]Unhandled: Unexpected token ...
##[error]C:\Users\davidantolinez\Documents\my_agent\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.36.0\node_modules\hpagent\index.js:9
    const { proxy, proxyRequestOptions, ...opts } = options.

the pipeline is this

jobs:
- job: 'analysis'
  displayName: 'analysis with sonar'
  steps: 
  - checkout: none
  - task: SonarQubePrepare@4
    inputs:
        SonarQube: 'mySonarqube'
        scannerMode: 'CLI'
        configMode: 'manual'
        cliProjectKey: 'nodejs'
        cliProjectName: 'nodejs'
        cliAdditionalArgs: >
          sonar.sources=$(Build.SourcesDirectory)/src
          # sonar.tests=$(Build.SourcesDirectory)/src/__test__ 
          # sonar.exclusions=$(Build.SourcesDirectory)/src/__test__/**
          # sonar.testExecutionReportPaths=$(Build.SourcesDirectory)/test-report.xml 
          # sonar.javascript.lcov.reportPaths=$(Build.SourcesDirectory)/coverage/lcov.info"
  - task: SonarQubeAnalyze@4
    displayName: 'Run SonarQube analysis'
  - task: SonarQubePublish@4
    inputs:
      pollingTimeoutSec: '300'

Im using a docker image of sonar the lts version i also ran a jenkins pipeline to verify the connection with sonar and it worked, someone can help me with this error.

##[error]Unhandled: Unexpected token ...
##[error]C:\Users\davidantolinez\Documents\my_agent\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.36.0\node_modules\hpagent\index.js:9
    const { proxy, proxyRequestOptions, ...opts } = options.

Can you offer a wider range of logs?

Is there a solution for this?
I have a similar problem where the agent is running on centos 7 with kernerl 3.

I can see that it looks like something does not like the “merge” javascript operator,

I wrote a quick JavaScript test function and ran on the centos.