Kon*_*Row 0 bootstrap-4 angular-cli angular angular5
我正在尝试构建一个用于部署到 IIS 的 Angular 5 项目。
当我运行以下命令时:
ng build --prod
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
./node-modules/bootstrap/dist/css/bootstrap.min.css 中的错误。
模块构建失败:BrowserslistError:未知的浏览器专业。
我阅读了有关此错误的信息,并看到建议的解决方案是将 Angular CLI 升级到 1.7.0 或更高版本。我的 CLI 版本是 1.7.3,Bootstrap 版本是 4.0.0。
如何修复此错误以便我可以构建我的解决方案?
此处提到了该问题https://github.com/angular/angular-cli/issues/9020 但通常不应在 angular cli v1.7.0 中发生
尝试其他解决方法:
从 ../node_modules/bootstrap/dist/css/bootstrap.min.css 中的样式部分删除.angular-cli.json。
尝试将引导程序的 css 直接包含在您的全局styles.css文件中
@import "~bootstrap/dist/css/bootstrap.css";
Run Code Online (Sandbox Code Playgroud)
或styles.scss档案
@import "~bootstrap/scss/bootstrap";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1309 次 |
| 最近记录: |