Angular-cli: ERROR: Error: Browserslist: caniuse-lite is outdated. Please run next command `npm update`

Created on 6 Jan 2020  Β·  9Comments  Β·  Source: angular/angular-cli

🐞 Bug report

Command (mark with an x)



ng build

  • [ ] new
  • [x ] build
  • [ x] serve
  • [ ] test
  • [ ] e2e
  • [ ] generate
  • [ ] add
  • [ ] update
  • [ ] lint
  • [ ] xi18n
  • [ ] run
  • [ ] config
  • [ ] help
  • [ ] version
  • [ ] doc

Is this a regression?


Yes, the previous version in which this bug was not present was: ....

Description

A clear and concise description of the problem...
When I run build universal, I am getting this error
"ERROR: Error: Browserslist: caniuse-lite is outdated. Please run next command npm update"

Here is the analysis I did, I think the issue is really coming with dependency @babel/preset-env": "7.7.6" which use "browserslist": "^4.6.0" which uses "caniuse-lite": "1.0.30000967". So it throws the above error. Currently my script logic is synchronous run commands. So it breaks with this message.

πŸ”¬ Minimal Reproduction

πŸ”₯ Exception or Error




"ERROR: Error: Browserslist: caniuse-lite is outdated. Please run next command `npm update`"

🌍 Your Environment




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / β–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 8.3.20
Node: 10.14.0
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                                    Version
--------------------------------------------------------------------
@angular-devkit/architect                  0.803.20
@angular-devkit/build-angular              0.803.21
@angular-devkit/build-optimizer            0.803.21
@angular-devkit/build-webpack              0.803.21
@angular-devkit/core                       8.3.20
@angular-devkit/schematics                 8.3.20
@angular-devkit/schematics-cli             0.13.8
@angular/cdk                               8.2.3
@angular/cli                               8.3.20
@angular/material                          8.2.3
@ngtools/webpack                           8.3.21
@nguniversal/common                        8.2.6
@nguniversal/express-engine                8.2.6
@nguniversal/module-map-ngfactory-loader   8.2.6
@schematics/angular                        8.3.20
@schematics/schematics                     0.13.8
@schematics/update                         0.803.20
rxjs                                       6.4.0
typescript                                 3.5.3
webpack                                    4.39.2

Anything else relevant?

devkibuild-angular high broken bufix

Most helpful comment

@phani17c which command is throwing this error? Typically this is just a β€œwarning”.

Currently my script logic is synchronous run commands
Are you referring to a custom js script?

All 9 comments

@phani17c which command is throwing this error? Typically this is just a β€œwarning”.

Currently my script logic is synchronous run commands
Are you referring to a custom js script?

We encountered this today on our CI agents with ng test, no issue with building. We changed the caniuse-lite version in package-lock.json @angular-devkit/build-angular to 1.0.30001016 from 1.0.30000989.

The @angular-devkit/build-angular was on version 0.803.20 (0.803.21 is the latest).

NG build command is also complaining about this to me, should just require a package.json update right? Fast fix? It is indeed just a warning, but it's somewhat surprising to my back end guys who dont know what it means.

Mine does not show the error, just the same message.

Browserslist: caniuse-lite is outdated. Please run next command npm update

@alan-agius4 Will this be a new npm version after fix happen?

And @alan-agius4 you are right, I have custom script to run some npm scripts combined

please update the autoprefixer dependency to the latest one in this project, we need a new release for this one.

@phani17c, a new version will be released in the coming days.

Thanks @alan-agius4 I am closing this issue.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings