Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some NPM bitrot #3286

Merged
merged 7 commits into from
Aug 11, 2022
Merged

Fix some NPM bitrot #3286

merged 7 commits into from
Aug 11, 2022

Conversation

bobdenotter
Copy link
Member

@bobdenotter bobdenotter commented Aug 10, 2022

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

Copy link
Collaborator

@nestordedios nestordedios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@bobdenotter bobdenotter merged commit 93b3707 into master Aug 11, 2022
@bobdenotter bobdenotter deleted the fix/npm-build-process branch August 11, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asset versioning to ensure latest JS and CSS for backend
2 participants