0

I am getting error while starting angular app after successful npm install.

It shows below error -

ERROR in ./src/styles.scss (./node_modules/css-loader/dist/cjs.js??ref--13-1!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/dist/cjs.js ??ref--13-3!./src/styles.scss) Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Undefined function. ╷ 19 │ $marker-size-third: ceil(math.div($marker-size, 3)); │ ^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ node_modules\progress-tracker\src\styles\progress-tracker_progress-tracker-variables.scss 19:26 @import node_modules\progress-tracker\src\styles\progress-tracker.scss 1:9

Current package-lock.json has sass and sass-loader version -

"sass": "1.26.3", "sass-loader": "8.0.2",

1 Answer 1

0

The version of sass that you are using do not support the mathematical function div. You are using the version 1.26.3 and that function appeared in the version 1.33.0 as you can see in their documentation.

So in order to fix your issue, you have essentially 2 possibilities.

  1. Bump the sass version if you can (the preferable way).
  2. Use the old (and deprecated, so be aware) / operator.

If you use the option number 2, your code would become this:

$marker-size-third: ceil( $marker-size / 3 );
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.