Closed semihraifgurel closed 3 years ago
First, you need to understand why this error is occurring. The reason is that node-sass is not compatible with your sass-loader, so you need to match the node-sass version with the sass-loader. First of all, check your Node.js version, and second, check your sass-loader and node-sass versions. For example:
Check each of the versions to ensure they match. If, for instance, your Node.js version is 20, your node-sass version is 9, but your sass-loader version is 7, you will encounter an error. In this case, you need to first ensure that the versions match and align each of the versions.
I hope this explanation will help someone who is searching for a solution.
npm -v
): 7.12.0node -v
): 16.0.1node -p process.versions
): { node: '16.1.0', v8: '9.0.257.24-node.11', uv: '1.41.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.17.1', modules: '93', nghttp2: '1.42.0', napi: '8', llhttp: '6.0.1', openssl: '1.1.1k+quic', cldr: '39.0', icu: '69.1', tz: '2021a', unicode: '13.0', ngtcp2: '0.1.0-DEV', nghttp3: '0.1.0-DEV' }node -p process.platform
): darwinnode -p process.arch
): x64node -p "require('node-sass').info"
): node-sass 6.0.0 (Wrapper) [JavaScript] libsass 3.5.5 (Sass Compiler) [C/C++]npm ls node-sass
): theme-landing@0.1.0 /Users/semihraifgurel/GitHub.noindex/theme-landing ├── node-sass@6.0.0 └─┬ react-scripts@4.0.3 └─┬ sass-loader@10.1.1 └── node-sass@6.0.0 deduped invalidnpm ERR! code ELSPROBLEMS npm ERR! invalid: node-sass@6.0.0 /Users/semihraifgurel/GitHub.noindex/theme-landing/node_modules/node-sass
npm ERR! A complete log of this run can be found in: npm ERR! /Users/semihraifgurel/.npm/_logs/2021-05-10T07_38_04_899Z-debug.log semihraifgurel@Semih-MacBook-Pro theme-landing %