New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node Sass version 5.0.0 is incompatible with ^4.0.0. #27754
Comments
Workaround: use node-sass@4.14.1 (Error: Node Sass version 5.0.0 is incompatible with ^4.0.0) This is sass-loader requiring semver ^4.0.0, but node-sass just updated to 5.0.0 |
This just got merged in webpack-contrib/sass-loader/pull/899 Edit: And it looks like it's released in v10.0.5 |
simple fix worked for me:
|
Another workaround is to just use Dart Sass instead of Node Sass. Especially since LibSass and Node Sass are deprecated install Dart Sass: npm i -D sass update your before: {
resolve: `gatsby-plugin-sass`
} after: {
resolve: `gatsby-plugin-sass`,
options: {
implementation: require('sass')
},
} |
This is what I've been doing as well. Wouldn't it be better if the docs of |
This comment has been minimized.
This comment has been minimized.
Going into Node Modules - looking for node-sass - looking for version - changing it to "4.14.1" instead of 5.0.0 then going to the main project package.json file and changing the version of node-sass to "^4.14.1" |
My app builds have failed on AWS Amplify because of this issue. I first had to run
|
Here Is All Possible Solution added Error: Node Sass version 5.0.0 is incompatible with ^4.0.0 |
I've updated the PR #27991 to make the switch to Once we merge that and release the next major you can use |
You can install |
@kimbaudi Thank you for this you LEGEND. Changing the node version did not work for me, instead, installing with Dart did! Really appreciate it |
Doesn't work for me:
|
Thanks for that! I released a new version at |
This comment has been minimized.
This comment has been minimized.
Thanks! Worked perfectly with |
Damn it worked! Thanks! |
This comment has been minimized.
This comment has been minimized.
for anyone banging their head against the wall why none of these fixes above helped, please check your
with
|
You can use both the Node and Dart implementation but please note that the Node version was deprecated. With v3 there were breaking changes, please see them here: |
Description
When adding the gatsby-plugin-sass to new project, I get the error in the terminal
Generating development JavaScript bundle failed Node Sass version 5.0.0 is incompatible with ^4.0.0.
I saw this in stack overflow, seems like there was just a change. Hoping this is the issue:
Error: Node Sass version 5.0.0 is incompatible with ^4.0.0
( I tested with a few different gatsby starters and the issue persisted regardless of starter also upgraded my node version just incase)
Steps to reproduce
download Gatsby default starter
add
gatsby-plugin-sass
to projectExpected result
gatsby develop runs successfully
Actual result
Generating development JavaScript bundle failed Node Sass version 5.0.0 is incompatible with ^4.0.0.
Environment
System:
OS: macOS 10.15.7
CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm
Browsers:
Chrome: 86.0.4240.111
Safari: 14.0
npmPackages:
gatsby: ^2.24.91 => 2.24.91
gatsby-plugin-sass: ^2.3.22 => 2.3.22
The text was updated successfully, but these errors were encountered: