Warning division is decrepted - fontawesome


Topic: Warning division is decrepted - fontawesome

allancmello pro asked 3 years ago

package.json

  "dependencies": {
"@angular/animations": "~12.2.2",
"@angular/cdk": "^12.2.2",
"@angular/common": "~12.2.2",
"@angular/compiler": "~12.2.2",
"@angular/core": "~12.2.2",
"@angular/forms": "~12.2.2",
"@angular/platform-browser": "~12.2.2",
"@angular/platform-browser-dynamic": "~12.2.2",
"@angular/router": "~12.2.2",
"@angular/service-worker": "^12.2.4",
"@fortawesome/fontawesome-free": "^5.15.4",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"angular-calendar": "^0.28.28",
"angular-csv-ext": "^1.0.5",
"chart.js": "^3.5.1",
"easy-pie-chart": "^2.1.7",
"hammerjs": "^2.0.8",
"jarallax": "^1.12.7",
"jwt-decode": "^3.1.2",
"ng-uikit-pro-standard": "file:ng-uikit-pro-standard-12.0.0.tgz",
"rxjs": "~6.5.4",
"rxjs-compat": "^6.6.7",
"screenfull": "3.3.x",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"

}, "devDependencies": { "@angular-devkit/build-angular": "^12.2.2", "@angular/cli": "^12.2.2", "@angular/compiler-cli": "~12.2.2", "@angular/language-service": "~12.2.2", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.3.4", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~7.0.0", "tslint": "~6.1.0", "typescript": "~4.3.5" },

NPM Error

Generating browser application bundles (phase: building)...WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(20em, 16)

More info and automated migrator: https://sass-lang.com/d/slash-div

╷ 12 │ $fa-fw-width: (20em / 16); │ ^^^^^^^^^ ╵ node_modules\@fortawesome\fontawesome-free\scss_variables.scss 12:25 @import node_modules\@fortawesome\fontawesome-free\scss\regular.scss 5:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(20em, 16)

More info and automated migrator: https://sass-lang.com/d/slash-div

╷ 12 │ $fa-fw-width: (20em / 16); │ ^^^^^^^^^ ╵ node_modules\@fortawesome\fontawesome-free\scss_variables.scss 12:25 @import node_modules\@fortawesome\fontawesome-free\scss\brands.scss 5:9 root stylesheet

⠙ Generating browser application bundles (phase: building)...DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0. Recommendation: math.div(20em, 16)

More info and automated migrator: https://sass-lang.com/d/slash-div

╷ 12 │ $fa-fw-width: (20em / 16); │ ^^^^^^^^^ ╵ node_modules\@fortawesome\fontawesome-free\scss_variables.scss 12:25 @import node_modules\@fortawesome\fontawesome-free\scss\fontawesome.scss 5:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(4em, 3)

More info and automated migrator: https://sass-lang.com/d/slash-div

╷ 6 │ font-size: (4em / 3); │ ^^^^^^^ ╵ node_modules\@fortawesome\fontawesome-free\scss_larger.scss 6:15 @import node_modules\@fortawesome\fontawesome-free\scss\fontawesome.scss 8:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(3em, 4)

More info and automated migrator: https://sass-lang.com/d/slash-div

╷ 7 │ line-height: (3em / 4); │ ^^^^^^^ ╵ node_modules\@fortawesome\fontawesome-free\scss_larger.scss 7:17 @import node_modules\@fortawesome\fontawesome-free\scss\fontawesome.scss 8:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($fa-li-width * 5, 4)

More info and automated migrator: https://sass-lang.com/d/slash-div

╷ 6 │ margin-left: $fa-li-width * 5/4; │ ^^^^^^^^^^^^^^^^^^ ╵ node_modules\@fortawesome\fontawesome-free\scss_list.scss 6:16 @import node_modules\@fortawesome\fontawesome-free\scss\fontawesome.scss 10:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(20em, 16) More info and automated migrator: https://sass-lang.com/d/slash-div

╷ 12 │ $fa-fw-width: (20em / 16); │ ^^^^^^^^^ ╵ node_modules\@fortawesome\fontawesome-free\scss_variables.scss 12:25 @import node_modules\@fortawesome\fontawesome-free\scss\solid.scss 5:9

How to fix this?


Arkadiusz Idzikowski staff answered 3 years ago

@allancmello Please try to update FA to v6.0.0-beta2.

This problem is caused by the new dart sass version used in Angular CLI v12. You can check GitHub issue in FA repository where you can find other possible workarounds:

https://github.com/FortAwesome/Font-Awesome/pull/17940


allancmello pro commented 3 years ago

Thank you Arkadiusz.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB4 12.0.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes