Quick fix
Change your sass version to use the tilde ~
and it should work. This is because it will prohibit updated minor versions from being used, and allow only patches.
Example package.json line:
"sass": "~1.32.6"
See https://nodesource.com/blog/semver-tilde-and-caret/
Future-compatible fix
For those of you who want to refactor your use of /
, you need to get the style-resources module. With it, once adding '@nuxtjs/style-resources'
to your Nuxt config buildModules
, you can set hoistUseStatements: true
in a styleResources
property in the config. This will allow you to @use 'sass:math';
in your style block where you will change a/b
to math.div(a, b)