Hello Guys, How are you all? Hope You all Are Fine. Today I installed bootstrap in my laravel application with the help of npm. when I try to compile, It just shows endless warnings in Laravel. So Here I am Explain to you all the possible solutions here.
Without Wasting your time, Lets start This Article to Solve This Error.
How DEPRECATION WARNING: Using / for division is deprecated and will be removed Error Occurs ?
Today I installed bootstrap in my laravel application with the help of npm. when I try to compile, It just shows endless warnings in Laravel. then I see Endless loop with this warning.
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($spacer, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
253 │ 1: $spacer / 4,
│ ^^^^^^^^^^^
╵
node_modules\bootstrap\scss\_variables.scss 253:6 @import
node_modules\bootstrap\scss\bootstrap.scss 11:9 @import
resources\css\app.scss 2:9 root stylesheet
How To Solve DEPRECATION WARNING: Using / for division is deprecated and will be removed Error ?
Question: How To Solve DEPRECATION WARNING: Using / for division is deprecated and will be removed Error?
Answer: To solve this issue just Downgrade to a specific version of a package, in this case, SASS, you should. Note that this will update all of your other packages within NPM. If you do not want to do that, simply remove “sass” from your package-lock.json and that particular folder within node_modules. follow the below command.
Solution 1
Downgrade to a specific version of a package, in this case, SASS, you should. Note that this will update all of your other packages within NPM. If you do not want to do that, simply remove “sass” from your package-lock.json and that particular folder within node_modules. follow the below command.
- change
"sass": "^1.33.0",
to"sass": "1.32.13",
in package.json. - delete package-lock.json
- delete node_modules folder
- run npm install
Solution 2
Just Follow below Steps.
- Remove node_modules
rm -r .\node_modules\
- remove package-lock.json
rm -r .\package-lock.json
- Add one line
"sass": "1.32.13"
into package.json underdevDependencies
section.
Solution 3
If you use npm, you can just simply add
"devDependencies": {
...,
"sass": "~1.32.12"
}
Solution 4
The tilde ~
has been the default semver range specifier for package.json dependency definitions for two and a half years. Thanks to npm install --save
, package authors have been pinning to versions within a fixed major and minor pair but a floating patch version.
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"
Solution 5
Don’t use version 1.33.0, use the version before that 1.32.13 for now. Change it on your package.json "sass": "1.32.13"
And wait for the fix on the next version.
Summery
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also Read
Hi!
Sol 3 for me works.
Thanks!
sol 3 for me works.
Thanks!