我有一个包含 Javascript 和 Typescript 文件的项目。我正在使用 SonarCloud 从 Azure DevOps 管道分析这个项目。
我在构建管道中设置任务“准备分析配置”,如下所示:
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'Sonarcloud'
organization: 'MyOrg'
scannerMode: 'CLI'
configMode: 'manual'
cliProjectKey: 'My key'
cliProjectName: 'My name'
cliSources: '.'
Run Code Online (Sandbox Code Playgroud)
运行管道时,我的管道在Sonar Cloud Analysis步骤中出现以下错误
INFO: Found 1 tsconfig.json file(s): [/home/vsts/work/1/s/tsconfig.json]
##[error]ERROR: Cannot find module 'typescript'
##[error]ERROR: TypeScript dependency was not found and it is required for analysis.
ERROR: Install TypeScript in the project directory or use NODE_PATH env. variable to set TypeScript location, if it's located outside …Run Code Online (Sandbox Code Playgroud)