1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

bootstrap-material-designを使った時のコンパイルエラー

Posted at

環境

動作環境

  • Mac
  • PHP 5.6.30
  • Laravel 5.4
  • npm 6.8.0
  • yarn 1.13.0

composer.jsonの中身↓

パッケージ バージョン
bootstrap ^4.1.1
bootstrap-material-design ^4.1.1
jquery ^3.2.1

この環境下でnpm run watch-pollするとビルドエラーが発生する

どうやらBootstrapのバグのよう(たぶん)

解決方法

./node_modules/bootstrap-material-design/scss/mixins/_forms.scss

このファイルの159行目, 下記の行を次のように置換する

_forms.scss
@include form-validation-state("valid", $label-color);

↓︎

_forms.scss
@include form-validation-state("valid", $label-color, $form-feedback-icon-valid);

プロジェクトのルートディレクトリで下記コマンド実行

grep -l '@include form-validation-state("valid", $label-color);' ./node_modules/bootstrap-material-design/scss/mixins/_forms.scss | xargs sed -i.bak -e 's/@include form-validation-state("valid", $label-color);/@include form-validation-state("valid", $label-color, $form-feedback-icon-valid);/g'
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?