In the scanner logs we can see:
build 13-Sep-2021 11:13:40 INFO: Analyzing 42 files using tsconfig:...
error 13-Sep-2021 11:13:47 ERROR: Browserslist: caniuse-lite is outdated. Please run:
error 13-Sep-2021 11:13:47 ERROR: npx browserslist@latest --update-db
error 13-Sep-2021 11:13:47 ERROR:
error 13-Sep-2021 11:13:47 ERROR: Why you should do it regularly:
error 13-Sep-2021 11:13:47 ERROR: https://github.com/browserslist/browserslist#browsers-data-updating
[here missing further lines for the scanned module]
That does not impact the scan or build it seems, but still might be good to fix.
We are seeing the same errors/messages. No impact on scan. We are using the latest LTS Developer docker image without any further modifications or plugins.
SonarScanner for MSBuild 5.3.1
Using the .NET Framework version of the Scanner for MSBuild
INFO: SonarScanner 220.127.116.112
ERROR: Browserslist: caniuse-lite is outdated. Please run:
ERROR: npx browserslist@latest --update-db
INFO: 3/3 source files have been analyzed
INFO: No input files found for analysis
INFO: EXECUTION SUCCESS
INFO: The SonarScanner CLI has finished
I believe it’s not “impacting” the builds, as your scan completes successfully.
It’s just an error in the logs and probably some other side-effects like not properly analysing all the “current” rules that would come with the new version of the browserslist package.
Still, would be good to have a new patch release with the updated version of the package.
indeed there is this automatic update mechanism in browserlist dependency. I created two tickets to handle this issue
04:06PM - 23 Sep 21 UTC
Browserlist is a transitive dependency of @babel-core and has an automatic mecha
I’ve just found that the message can be suppressed by setting environment variable
I found this in
It seems to fix the problem for me.Can you test on your setup?
Can you please clarify where you set that? /conf/sonar.properties? or somewhere different. thanks!
I added it to /conf/sonar.properties and I still see the error in the output.
@tnapplications and @chicadilly ,
BROWSERSLIST_IGNORE_OLD_DATA=true as an environment variable, not within the sonar.properties file.
For example, at your command line or terminal, you set the environment variable, then you run sonar-scanner:
$ export BROWSERSLIST_IGNORE_OLD_DATA=true
$ sonar-scanner.... etc.
Yay! That worked! I set it as a variable in my build definition. The error has cleared.
Thanks so much for the help!
Any idea where to set these environment variables when using ALM Integration? Azure DevOps in particular
HI, Even I’m facing this issue.Could you please explain me where exactly i’ve to set this variable in Pipeline ?
Are you using Azure DevOps? I believe you can add this to your pipeline yaml:
- name: BROWSERSLIST_IGNORE_OLD_DATA
Try that and see if it works.
That worked for me. Thanks
On a side note the error is not impacting the scan. Even with error scan completed successfully.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.