I've encountered several articles on stack that didn't quite solve my issues. The problem arose when I tried to import a custom SCSS file into my React app.js to override bootstrap theme colors.
Here are the style imports in my App.js:
import "bootstrap/dist/css/bootstrap.min.css";
import "./shards-dashboard/styles/shards-dashboards.1.1.0.min.css";
import "./scss/styles.scss";
Upon installing node-sass, I faced the error message:
Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
After uninstalling node-sass and installing version 4.14.1, the compatibility issues were resolved but gave rise to a new error:
./src/scss/styles.scss (./node_modules/css-loader??ref--6-oneOf-5-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/lib/loader.js!./src/scss/styles.scss)
undefined
^
Invalid CSS after " */": expected selector, was "(function (global, "
in C:\Users\Stephanie\Documents\Projects\BidRL\bidrl-front\node_modules\bootstrap\dist\js\bootstrap.js (line 6, column 1)
When I commented out the custom SCSS import in app.js, the compilation was successful, but I'm determined to make my custom SCSS work.
Some posts suggested upgrading Node, so I went from v14.15.5 to v16.3.0, only to encounter another error:
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)
Reinstalling node-sass without specifying any versions ("node-sass": "^6.0.0") brought me back to the compatibility error.
I also attempted saving as dev dependencies with no luck:
"devDependencies": {
"node-sass": "^6.0.0",
"sass-loader": "^7.1.0"
}
Any solutions to this issue?