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.

Module build failed: BrowserslistError: Unknown browser major, 4.0.0-beta.3

See original GitHub issue

I just install 4.0.0-beta.3 within my Angular 5 project with npm install bootstrap@4.0.0-beta.3 In bootstrap@4.0.0-beta.2 I used following .angular-cli.json config and it works well

"styles": [        
  "../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
  "../node_modules/jquery/dist/jquery.min.js",
  "../node_modules/bootstrap/dist/js/bootstrap.bundle.js"
]

But in bootstrap@4.0.0-beta.3 I get the following error at ng serve command

ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser major
    at error (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\browserslist\index.js:37:11)
    at Function.browserslist.checkName (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\browserslist\index.js:320:18)
    at Function.select (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\browserslist\index.js:438:37)
    at D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\browserslist\index.js:207:41
    at Array.forEach (<anonymous>)
    at browserslist (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\browserslist\index.js:196:13)
    at Browsers.parse (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\autoprefixer\lib\browsers.js:44:14)
    at new Browsers (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\autoprefixer\lib\browsers.js:39:28)
    at loadPrefixes (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\autoprefixer\lib\autoprefixer.js:56:18)
    at plugin (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
    at LazyResult.run (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:270:20)
    at LazyResult.asyncTick (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:185:32)
    at LazyResult.asyncTick (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:197:22)
    at processing.Promise.then._this2.processed (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:224:20)
    at new Promise (<anonymous>)
    at LazyResult.async (D:\Sources\VistaBest\VistaBest\VistaBest.Angular\VistaBest\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:221:27)
 @ ./node_modules/bootstrap/dist/css/bootstrap.min.css 4:14-131
 @ multi ./node_modules/bootstrap/dist/css/bootstrap.min.css ./src/bootstrap-custom.css ./src/materials-custom.css ./src/styles.css ./src/rtl.css

My jQuery version: 3.2.1 Angular cli version: 1.6.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
IcodeNetcommented, Jan 2, 2018

in Case someone else lands here. This is an angular reported issue see https://github.com/angular/angular-cli/issues/9020

1reaction
wolfy1339commented, Dec 29, 2017

Bootstrap cannot help with this, you should ask angular folks. The error is related to browserlist which is used by autoprefixer

Read more comments on GitHub >

github_iconTop Results From Across the Web

BrowserslistError: Unknown browser major - Stack Overflow
The issue could be that you got the latest build with some bug. I noticed that bootstrap@4.0.0-beta.3 is causing this issue, ...
Read more >
Javascript – BrowserslistError: Unknown browser major
The issue could be that you got the latest build with some bug. I noticed that bootstrap@4.0.0-beta.3 is causing this issue, but not...
Read more >
javascript — BrowserslistError: majeur de navigateur inconnu
BrowserslistError: majeur de navigateur inconnu. J'essaie d'utiliser bootstrap 4 ... Module build failed: BrowserslistError: Unknown browser major at error ...
Read more >
Unknown browser query `dead`” #React #npm | Mixster
[Solved] “Module build failed: BrowserslistError: Unknown browser query `dead`” #React #npm. Not to keep you waiting, ...
Read more >
[Angular2] 4/4 Add Bootstrap in Angualr 4 (앵귤라에 부트 ...
버전 4.0.0-beta.3 으로 설치하니 오류가 나서 4.0.0-beta 로 설치 ... Module build failed: BrowserslistError: Unknown browser major
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