ERROR: Browserslist: caniuse-lite is outdated

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:
[here missing further lines for the scanned module]

Scanner version:

That does not impact the scan or build it seems, but still might be good to fix.

1 Like

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.

1 Like

We are having same exact issue and it’s impacting our ci/cd builds using JavaScript , we have an Enterprise Edition Licence (Version 8.9.1 (build 44547) , we are using SonarScanner.MSBuild.exe wrapped in an custom application. The ERRORS flagged we think that must be flagged as Warnings, cause the Analysis complete successful.Nothing has changed in our side, no versions, no updates, so no idea from where this error is coming … can you give us a hint where to look or how to solve it?

SonarScanner for MSBuild 5.3.1
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.

INFO: SonarScanner

ERROR: Browserslist: caniuse-lite is outdated. Please run:
ERROR: npx browserslist@latest --update-db

INFO: 3/3 source files have been analyzed
INFO: Sensor JavaScript analysis [javascript] (done) | time=13702ms
INFO: Sensor TypeScript analysis [javascript]
INFO: No input files found for analysis

INFO: The SonarScanner CLI has finished

1 Like

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

1 Like

I’ve just found that the message can be suppressed by setting environment variable BROWSERSLIST_IGNORE_OLD_DATA=true

I found this in

It seems to fix the problem for me.Can you test on your setup?

1 Like

Hi Tibor,

Can you please clarify where you set that? /conf/ or somewhere different. thanks!

I added it to /conf/ and I still see the error in the output. :frowning:

Hi @tnapplications and @chicadilly ,

You set BROWSERSLIST_IGNORE_OLD_DATA=true as an environment variable, not within the file.

For example, at your command line or terminal, you set the environment variable, then you run sonar-scanner:

$ sonar-scanner.... etc.

1 Like

Yay! That worked! I set it as a variable in my build definition. The error has cleared.
Thanks so much for the help!

1 Like

Any idea where to set these environment variables when using ALM Integration? Azure DevOps in particular

There are many ways to set environment variables in Azure DevOps, please check these articles:

1 Like

HI, Even I’m facing this issue.Could you please explain me where exactly i’ve to set this variable in Pipeline ?

Hi @rishad-mj ,

Are you using Azure DevOps? I believe you can add this to your pipeline yaml:

  value: true

Try that and see if it works.

1 Like

That worked for me. Thanks @Joe

On a side note the error is not impacting the scan. Even with error scan completed successfully.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.