简体   繁体   English

Angular v5问题编译Bootstrap4样式

[英]Angular v5 issue compiling Bootstrap4 styles

I am trying to use Bootstrap4 for one of my project; 我正在尝试将Bootstrap4用于我的项目之一; however, when I set up my project with angular-cli following this tutorial ( https://medium.com/codingthesmartway-com-blog/building-an-angular-5-project-with-bootstrap-4-and-firebase-4504ff7717c1 ), I am getting this error in the terminal: 但是,当我按照本教程( https://medium.com/codingthesmartway-com-blog/building-an-angular-5-project-with-bootstrap-4-and-firebase- 4504ff7717c1 ),我在终端中收到此错误:

 ERROR in ./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.css Module build failed: BrowserslistError: Unknown browser major at error (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/browserslist/index.js:37:11) at Function.browserslist.checkName (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/browserslist/index.js:320:18) at Function.select (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/browserslist/index.js:438:37) at /Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/browserslist/index.js:207:41 at Array.forEach (<anonymous>) at browserslist (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/browserslist/index.js:196:13) at Browsers.parse (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/autoprefixer/lib/browsers.js:44:14) at new Browsers (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/autoprefixer/lib/browsers.js:39:28) at loadPrefixes (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/autoprefixer/lib/autoprefixer.js:56:18) at plugin (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/autoprefixer/lib/autoprefixer.js:62:18) at LazyResult.run (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:277:20) at LazyResult.asyncTick (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:192:32) at LazyResult.asyncTick (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:204:22) at processing.Promise.then._this2.processed (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:231:20) at new Promise (<anonymous>) at LazyResult.async (/Users/Pastrana/GitHub/PersonalWebsite/PersonalWebsite/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:228:27) @ ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./src/styles.css 

3:10-186 @ ./src/styles.css @ multi ./src/styles.css 3:10-186 @ ./src/styles.css @多./src/styles.css

I've used Bootstrap before perfectly, so I do not know if there is an issue with the new beta version released one week ago. 我之前曾经使用过Bootstrap,所以我不知道一周前发布的新Beta版本是否存在问题。

Thank you! 谢谢!

There is an error with the newest version of Bootstrap4. 最新版本的Bootstrap4错误。 If you want to know how to fix it please visit: https://github.com/angular/angular-cli/issues/9020 如果您想知道如何解决它,请访问: https : //github.com/angular/angular-cli/issues/9020

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM