JetBrains / Qodana

📝 Source repository of Qodana Help
https://www.jetbrains.com/help/qodana
Apache License 2.0
392 stars 67 forks source link

Error: QodanaScan Azure pipeline task v1.0.4 #81

Closed pa-terrythibodeau closed 2 years ago

pa-terrythibodeau commented 2 years ago

Discussed in https://github.com/JetBrains/Qodana/discussions/80

Originally posted by **pa-tthibodeau** April 12, 2022 Following the instructions from the [Qodana Azure Pipelines blog announcement](https://blog.jetbrains.com/qodana/2022/04/introducing-qodana-for-azure-pipelines/?utm_campaign=qodana&utm_content=blog&utm_medium=referral&utm_source=twitter&utm_term=azure-pipelines), I tried running the QodanaScan task and receive the following error: ``` Starting: QodanaScan ============================================================================== Task : Qodana Scan Description : Scan your project with Qodana (https://jetbrains.com/qodana) Version : 1.0.4 Author : JetBrains Help : Qodana documentation is available at [https://jetbrains.com/help/qodana/.](https://jetbrains.com/help/qodana/) This task will scan your project. ============================================================================== internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module 'azure-pipelines-task-lib/task' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home/vsts/work/_tasks/QodanaScan_822d6cb9-d4d1-431b-9513-e7db7d718a49/1.0.4/index.js:4458:10) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) ##[error]Exit code 1 returned from process: file name '/home/vsts/agents/2.202.0/externals/node10/bin/node', arguments '"/home/vsts/work/_tasks/QodanaScan_822d6cb9-d4d1-431b-9513-e7db7d718a49/1.0.4/index.js"'. Finishing: QodanaScan ``` The azure-pipelines.yml task is using the default settings: ``` - task: QodanaScan@1 inputs: artifactName: 'CodeAnalysisLogs' ``` As ours is a Java project, I also tried, with the same error: ``` - task: QodanaScan@1 inputs: args: '--linter jetbrains/qodana-jvm:2021.3-eap' artifactName: 'CodeAnalysisLogs' ```