. Advertisement .
..3..
. Advertisement .
..4..
When you do your task, you receive the following error: Using / for division is deprecated and will be removed in Dart Sass 2.0.0. This is one of the most popular errors that any programmer could make. As a result, why would it appear, but is it resolvable? We’ll go over it with you.
When Does The Error ”Using / for division is deprecated and will be removed in Dart Sass 2.0.0” Occur?
Today using vuetify in Nuxtjs causes a slew of errors. Using / for division is deprecated and will be removed in Dart Sass 2.0.0. during Nuxtjs yarn development.
The Amazing Approaches For The Error ”Using / for division is deprecated and will be removed in Dart Sass 2.0.0”
Surprisingly, you just solved it using the method mentioned below.
Solution 1: Change your sass version to use the tilde
Thi first solution to fix the error ”Using / for division is deprecated and will be removed in Dart Sass 2.0.0” is changing your sass version to use the tilde.
For the past two and a half years, the tilde has been the default semver range specifier for package.json dependency definitions. Package authors have been pinning to versions within a fixed major and minor pair, but a floating patch version thanks to npm install —save.
It should work if you change your sass version to use the tilde. This is because it will prohibit the use of updated minor versions and will only allow patches.
Example package.json line:
"sass": "~1.32.6"
Solution 2: Use this code in package.json
We believe there is an issue with vuetify. However, if you use yarn, you can use this code in package.json.
"resolutions": {
"@nuxtjs/vuetify/**/sass": "1.32.12"
}
Solution 3: Add to package.json
If you’re using npm, you can add to package.json:
"devDependencies": {
...,
"sass": "~1.32.12"
}
Solution 4: Follow the steps below
You need to follow the steps below.
Remove the node modules module. Remove package-lock with rm -r.node modules. json package-lock.json rm -r.
Add a single line “sass“: “1.32.13” to the package.json in the section devDependencies.
Solution 5: Avoid using version 1.33.0
For the time being, avoid using version 1.33.0 and instead stick with version 1.32.13. On your package, it should be changed. “sass” in json: “1.32.13”. And then wait for the next version to be fixed.
Solution 6: Use math module div function
Excepting the solutions mentioned above, there is another solution for you to fix the ”Using / for division is deprecated and will be removed in Dart Sass 2.0.0” error. It is using math module div function.
It is simple to fix because the newest version of Sass has a math module with a div function.
Only the dart-sass version of div is supported; the node-sass version does not. Look at the following example to further understand about this method.
@use "sass:math";
math.div in sass
$min-width:800;
content{
width: math.div($min-width, 2);
}
After doing that, your error will completely disappear. Although this is a simple soluttion, it works perfectly. So, what are you waiting without applying this method for your problem to get the desired results?
Conclusion
If you’re still stumped by the error “Using / for division is deprecated and will be removed in Dart Sass 2.0.0“, the above solution is the quickest. Researchers have a large community to turn to when you still prefer help or have basic issues, and everyone is always happy to help. Finally, we wish all of our readers a fantastic day full of new ideas.
Read more
Leave a comment