SassError: There is no module with the namespace "math"

Solution 1:

Figured it out. I needed to add

@use 'sass:math';

at the top of the file.

Solution 2:

What I could recommend you is an automatic (lazy) way - you may use:

$ npm install -g sass-migrator
$ sass-migrator division **/*.scss

From: https://sass-lang.com/documentation/breaking-changes/slash-div#automatic-migration