I was trying to replace node-sass with sass in react, so I have updated the package.json file and removed node-sass, and added sass. Since the updated version of sass-loader works with Dart sass it should have worked fine.
package.json -- old
"node-sass" : "^7.0.0",
"sass-loader": "10.1.0",
"webpack": "5.10.1"
package.json -- updated
"sass" : "^1.29.0",
"sass-loader": "10.1.0",
"webpack": "5.10.1"
But in the package-lock.json I could node-sass is still present.
"peerDependencies": {
"fibers": ">= 3.1.0",
"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"sass": "^1.3.0",
"webpack": "^4.36.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"fibers": {
"optional": true
},
"node-sass": {
"optional": true
},
"sass": {
"optional": true
}
}
I tried updating sass and sass-loader to the updated version it's still not working, also while compiling in webpack I get this error
node_modules\async-helpers\index.js:162
[ERROR] throw new TypeError('expected helpers to be an object');