sass-extract
sass-extract copied to clipboard
Update node-sass peer dependency version?
Do you guys have any intention to upgrade node-sass peer dependency version?
For those who are using node-sass v5.0.0 or v6.0.x, they have problems to use your package
$ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/node-sass
npm ERR! dev node-sass@"5.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer node-sass@"^3.8.0 || 4" from [email protected]
npm ERR! node_modules/sass-extract
npm ERR! dev sass-extract@"2.1.0" from the root project
This blocks users currently using sass-extract from upgrading to node 16.x.x / node-sass 6.x.x
it seems like this repo isn't supported/maintained anymore
I needed to upgrade a legacy project from node 14 to node 16 and also ran into this problem after updating node-sass to the latest version (8.0.0 at time of writing)
To work around the issue, I added the following to the overrides section of our package.json
"overrides": {
"sass-extract": {
"node-sass": "^8.0.0"
}
},
overrides docs https://docs.npmjs.com/cli/v9/configuring-npm/package-json?v=true#overrides
with this in place, the errors about version mismatches for sass-extract and node-sass are gone when running npm install ... I guess there's no guarantee this will work with future versions of node and/or node-sass
I should also mention that the only sass-extact method we use is extractSync ... which doesn't throw any errors or warnings with this setup... I don't know if all the other sass-extract methods are so lucky
I'm not 100% sure, but I think overrides is supported with npm version 8 and up which I think should be present with at least node 16+