无法在Angular 6中添加Bootstrap 4。
- 论坛
- 无法在Angular 6中添加Bootstrap 4。
27 浏览
无法在Angular 6中添加Bootstrap 4。
当我尝试使用npm install bootstrap
命令添加最新版本的Bootstrap时,我遇到了一个问题。然后,当我尝试运行ng serve --open
命令时,我收到了一个错误消息。我在angular.json文件中添加了Bootstrap,如下所示:
"styles": [ "../node_modules/bootstrap/dist/css/bootstrap.min.css", "src/styles.css" ]
。错误消息是:
ERROR in multi ../node_modules/bootstrap/dist/css/bootstrap.min.css ./src/styles.css Module not found: Error: Can't resolve '...\node_modules\bootstrap\dist\css\bootstrap.min.css' in '...'
。为什么会出现这个错误消息?