Must-share information (formatted with Markdown):
- which versions are you using SonarQube 10.2.1.78527
- how is SonarQube deployed: zip
- what are you trying to achieve: scan VueJS/Typescript/SASS app from github action.
- what have you tried so far to achieve this
While running sonar-scan as github action, the scan fail with error:
Error: Cannot find module ‘postcss-sass’
INFO: 602/602 source files have been analyzed
[97](https://github.com/********/actions/runs/********/job/********#step:6:98)INFO: Hit the cache for 0 out of 602
[98](https://github.com/********/actions/runs/********/job/********#step:6:99)INFO: Miss the cache for 602 out of 602: ANALYSIS_MODE_INELIGIBLE [602/602]
[99](https://github.com/********/actions/runs/********/job/********#step:6:100)INFO: Sensor JavaScript/TypeScript analysis [javascript] (done) | time=49467ms
[100](https://github.com/********/actions/runs/********/job/********#step:6:101)INFO: Sensor CSS Rules [javascript]
[101](https://github.com/********/actions/runs/********/job/********#step:6:102)INFO: 134 source files to be analyzed
[102](https://github.com/********/actions/runs/********/job/********#step:6:103)ERROR: Error: Cannot find module 'postcss-sass'
Our workflow is pretty simple
name: SonarQube Scan
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
sparse-checkout: |
.github
backend
frontend/src
tools
- name: install frontend for quasar app-vite tsconfig-preset.json
run: npm install
working-directory: frontend
- name: install postcss-sass
run: npm install -g postcss @csstools/postcss-sass
- name: sonarqube scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Tried to install postcss @csstools/postcss-sass
locally, globally or as dev dependencies but nothing works.
Running the scanner from my local is working fine.
Do I miss something to scan SASS files?