question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BrowserslistError: Unknown version 67 of android

See original GitHub issue

Type of Issue

[x] Bug Report
[ ] Feature Request

Description

Recently I updated my Angular project dependency versions and I get this error when trying to build a library:

ERROR: Unknown version 67 of android
An unhandled exception occurred: Unknown version 67 of android
See "C:\Users\doteteix\AppData\Local\Temp\ng-5ErChV\angular-errors.log" for further details.

I can get more detail from this angular-errors.log. This is the extra info:

[error] BrowserslistError: Unknown version 67 of android
    at Function.select (C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\node_modules\browserslist\index.js:924:17)
    at C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\node_modules\browserslist\index.js:252:33
    at Array.reduce (<anonymous>)
    at resolve (C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\node_modules\browserslist\index.js:234:18)
    at browserslist (C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\node_modules\browserslist\index.js:353:16)
    at Browsers.parse (C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\lib\browsers.js:66:12)
    at new Browsers (C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\lib\browsers.js:48:26)
    at loadPrefixes (C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\lib\autoprefixer.js:101:20)
    at plugin (C:\Projects\Source\html5-console\node_modules\ng-packagr\node_modules\autoprefixer\lib\autoprefixer.js:112:20)
    at LazyResult.run (C:\Projects\Source\html5-console\node_modules\postcss\lib\lazy-result.js:295:14)

How To Reproduce

I try to build my lirary executing:

ng build core

Expected Behaviour

The library is built as expected and as usual before I updated versions.

Version Information

$ node_modules/.bin/ng-packagr --version
ng-packagr: 5.5.1
@angular/*: 8.2.5
@angular/cli: ^8.3.3
@angular/material: 8.1.4
@angular/cdk: 8.1.4
typescript: ~3.4.3
rxjs: ^6.4.0
node: 12.8.0
npm: 6.10.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

37reactions
andrewryan1906commented, Oct 1, 2019

@mrtijn I was able to fix it by taking these steps:

1.Deleting the entire node_modules directory 2.Deleting package-lock.json from the root directory 3. Making sure the latest @angular-devkit projects were referenced in package.json:

"@angular-devkit/build-angular": "^0.801.3", "@angular-devkit/build-ng-packagr": "^0.801.3",

  1. Running npm install

That fixes it. Have no idea why.

9reactions
robbiedigitalcommented, Oct 10, 2019

I have tried @andrewryan1906 solution. I deleted my node_modules and package-lock.json file, re-installed with "@angular-devkit/build-angular": "^0.801.3" and "@angular-devkit/build-ng-packagr": "^0.801.3"

I am still getting:

BUILD ERROR Unknown version 67 of android An unhandled exception occurred: Unknown version 67 of android

SOLUTION UPDATE:

I had to explicitly install the working version of “caniuse-lite” to version “1.0.30000997”

Read more comments on GitHub >

github_iconTop Results From Across the Web

BrowserslistError: Unknown version 67 of android
Can be caused by outdated babel. Try update babel using npx babel-upgrade --write and then npx browserslist@latest --update-db .
Read more >
BrowserslistError: Unknown version 67 of android
Coming soon: A brand new website interface for an even better experience!
Read more >
BrowserslistError: Unknown version 67 of android - CSDN博客
Unknown version 67 of android. 在npm run build时出现的错误。 解决方法是升级依赖中的: "@angular-devkit/build-angular" ...
Read more >
Renovate Bot Package Diff
Fix `Unknown version 11 of Node.js` error (by Dan Onoshko). 79. -. 80. - ## 4.3.1. 81. - * Fix conflict between `caniuse-lite`...
Read more >
Trouble updating angular 11 to angular 13 - Web Client Dev
BrowserslistError : Unknown version 81 of android at Function.select (/home/kushal/patstha/hello/node_modules/browserslist/index.js:1130:17)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found