Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
220 views
in Technique[技术] by (71.8m points)

javascript - BrowserslistError: Unknown browser major

I'm trying to use bootstrap 4 with my angular installation. i've run npm install --save bootstrap@next but i have a break at runtime :

./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss","plugins":[null,null,null],"sourceMap":false}!./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser major
    at error (C:xampphtdocsick_master_angularweb
ode_modulesrowserslistindex.js:37:11)
    at Function.browserslist.checkName (C:xampphtdocsick_master_angularweb
ode_modulesrowserslistindex.js:320:18)
    at Function.select (C:xampphtdocsick_master_angularweb
ode_modulesrowserslistindex.js:438:37)
    at C:xampphtdocsick_master_angularweb
ode_modulesrowserslistindex.js:207:41
    at Array.forEach (native)
    at browserslist (C:xampphtdocsick_master_angularweb
ode_modulesrowserslistindex.js:196:13)
    at Browsers.parse (C:xampphtdocsick_master_angularweb
ode_modulesautoprefixerlibrowsers.js:44:14)
    at new Browsers (C:xampphtdocsick_master_angularweb
ode_modulesautoprefixerlibrowsers.js:39:28)
    at loadPrefixes (C:xampphtdocsick_master_angularweb
ode_modulesautoprefixerlibautoprefixer.js:56:18)
    at plugin (C:xampphtdocsick_master_angularweb
ode_modulesautoprefixerlibautoprefixer.js:62:18)
    at LazyResult.run (C:xampphtdocsick_master_angularweb
ode_modulespostcss-loader
ode_modulespostcssliblazy-result.js:270:20)
    at LazyResult.asyncTick (C:xampphtdocsick_master_angularweb
ode_modulespostcss-loader
ode_modulespostcssliblazy-result.js:185:32)
    at LazyResult.asyncTick (C:xampphtdocsick_master_angularweb
ode_modulespostcss-loader
ode_modulespostcssliblazy-result.js:197:22)
    at processing.Promise.then._this2.processed (C:xampphtdocsick_master_angularweb
ode_modulespostcss-loader
ode_modulespostcssliblazy-result.js:224:20)
    at LazyResult.async (C:xampphtdocsick_master_angularweb
ode_modulespostcss-loader
ode_modulespostcssliblazy-result.js:221:27)
    at LazyResult.then (C:xampphtdocsick_master_angularweb
ode_modulespostcss-loader
ode_modulespostcssliblazy-result.js:127:21)
 @ ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./src/styles.css 3:10-190
 @ ./src/styles.css
 @ multi ./src/styles.css

Can someone help please?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The issue could be that you got the latest build with some bug. I noticed that [email protected] is causing this issue, but not [email protected]. Check if yours is the same. Try uninstalling that and run something with a specific version.

npm install [email protected]

This resolved my problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...