core
core copied to clipboard
Fix some NPM bitrot
Fixes the build error in latest Bootstrap update:
Compiled with some errors in 33.25s
ERROR Failed to compile with 2 errors 13:21:28
error in ./assets/scss/bolt.scss 13:21:28
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined variable.
â•·
20 │ @each $color, $value in $theme-colors-rgb {
│ ^^^^^^^^^^^^^^^^^
╵
node_modules/bootstrap/scss/_root.scss 20:27 @import
assets/scss/vendor/bootstrap/bootstrap.scss 5:9 @import
assets/scss/vendor/vendor.scss 4:9 @import
assets/scss/bolt.scss 3:9 root stylesheet
Fixes the deprecations in Flagpack, like these:
: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(4, 3) or calc(4 / 3)
More info and automated migrator: https://sass-lang.com/d/slash-div
â•·
6 │ width: (4 / 3) * $size;
│ ^^^^^
╵
node_modules/flagpack/src/_mixins.scss 6:13 fp-size()
node_modules/flagpack/src/flagpack.scss 8:5 @import
assets/scss/vendor/flagkit.scss 7:9 @import
assets/scss/vendor/vendor.scss 7:9 @import
assets/scss/bolt.scss 3:9 root stylesheet
: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($fp-size, 6) or calc($fp-size / 6)
More info and automated migrator: https://sass-lang.com/d/slash-div
Now npm build
runs smoothly again:
Running webpack ...
✔ Webpack
Compiled successfully in 28.86s
DONE Compiled successfully in 28501ms 13:32:09
322 files written to public/assets
webpack compiled successfully
Bonus: Fixes #3275