node-sass: Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0.
- NPM version (
npm -v
): 7.12.0 - Node version (
node -v
): 16.0.1 - Node Process (
node -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 Platform (
node -p process.platform
): darwin - Node architecture (
node -p process.arch
): x64 - node-sass version (
node -p "require('node-sass').info"
): node-sass 6.0.0 (Wrapper) [JavaScript] libsass 3.5.5 (Sass Compiler) [C/C++] - npm node-sass versions (
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 invalid
npm 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 %
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 22
- Comments: 100 (2 by maintainers)
For anyone looking for how to fix: Delete package-lock.json Delete node_modules in the terminal run npm install or yarn install
I dont have sass-loader as a dependency in my project (used a fresh create react app) and followed the steps on https://create-react-app.dev/docs/adding-a-sass-stylesheet/
and got this error
Adding sass-loader as as dev-dependency solved this for me.
"devDependencies": { "node-sass": "^6.0.0", "sass-loader": "^11.1.1" }
@tanapaydin is right, but I also had to erase the
node_modules
folder and the lock file to work.Error: Node Sass version 5.0.0 is incompatible with ^4.0.0. or node sass version 5.0.0 is incompatible with ^4.0.0
SOLUTION THAT WORKED FOR ME
with npm => 1.npm uninstall node-sass 2.npm install node-sass@4.14.1 with yarn => 1.yarn remove node-sass 2.yarn remove node-sass@4.14.1
sass-loader requires node-sass 4 or 5. https://github.com/webpack-contrib/sass-loader/blob/master/package.json#L43
Illegal in 2021 to have this issue
Couldn`t install node-sass 4.14, instead found that node-sass is deprecated so I move to dart-sass
run
yarn remove node-sass
yarn add sass
npm uninstall node-sass
npm install sass
The easy solution I found in this video: https://www.youtube.com/watch?v=7uLl4XvFlFs
As of 2 days ago,
sass-loader
is compatible withnode-sass
4, 5, or 6. https://github.com/webpack-contrib/sass-loader/pull/947You should be able to update
sass-loader
to get this compatibilityI installed the last version of sass-loader by
npm install sass-loader@latest
and reloaded the page and that solved the problem to menode-sass is a deprecated lib remove it then use
[dart-sass](https://www.npmjs.com/package/dart-sass)
(it’s renamed to[sass](https://www.npmjs.com/package/dart-sass)
)yarn remove node-sass
ornpm uninstall node-sass
then
yard add sass --dev
ornpm i sass --dev
it worked for me.
i have same error , and do it your suggest, but its same when open app: Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0.
I also tried the same thing but I still get the error
Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0.
Find a solution:
updating css-loader and react-script fixed my issue.
to fix it I had to remove
node_modules
andyarn.lock
(not sure if it is ok for everyone) then I add to mypackage.json
node-sass
dependencyand run
yarn install
not sure what exactly helped me that’s really weird behaviour
I’m using
react-scripts@4.0.3
and it requiressass-loader@^10.0.5
and after above actions I havesass-loader@10.2.0
installed in mynode_modules
which is allow to usenode-sass@6.0.0
because inpeerDependecies
of this version I see"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0"
yarn add --exact react-scripts@4.0.3
worked for me. Node v16None of the solutions proposed here worked for my React project. For anyone struggling with the same thing, here’s the solution: update
react-scripts
to the latest version, as described here: https://create-react-app.dev/docs/updating-to-new-releases/After that you can install
node-sass
andsass-loader
as suggested by others.@MrIndra after you add the dev dependencies did you do the following:
npm install
(if you are using Yarnyarn install
)I was receiving the error: “Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0.”. The problem on my end was I was using Node version: v14.15.3; when I checked the node-sass page on npmjs.com, I saw the supported node-sass version was 4.14+. npm install node-sass@4.14.1 fixed the issue.
This worked for migrated
react-scripts
to4.0.3
Same issue here.
NPM version: 7.10.0
Node version v16.0.0
Node Process: { node: ‘16.0.0’, v8: ‘9.0.257.17-node.10’, uv: ‘1.41.0’, zlib: ‘1.2.11’, brotli: ‘1.0.9’, ares: ‘1.17.1’, modules: ‘93’, nghttp2: ‘1.43.0’, napi: ‘8’, llhttp: ‘6.0.0’, openssl: ‘1.1.1k’, cldr: ‘39.0’, icu: ‘69.1’, tz: ‘2021a’, unicode: ‘13.0’ }
Node Platform: darwin
Node architecture: x64
node-sass version: node-sass 6.0.0 (Wrapper) [JavaScript] libsass 3.5.5 (Sass Compiler) [C/C++]
npm node-sass versions: frontend@0.1.0 /Users/leo/dev/Python/project/frontend ├── node-sass@6.0.0 └─┬ react-scripts@4.0.3 └─┬ sass-loader@10.1.1 └── node-sass@6.0.0 deduped invalid
npm ERR! code ELSPROBLEMS npm ERR! invalid: node-sass@6.0.0 /Users/leo/dev/Python/project/frontend/node_modules/node-sass
npm ERR! A complete log of this run can be found in: npm ERR! /Users/leo/.npm/_logs/2021-05-10T09_05_18_799Z-debug.log
./src/styles/_global.scss (./node_modules/css-loader/dist/cjs.js??ref–5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref–5-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref–5-oneOf-6-4!./src/styles/_global.scss) Node Sass version 6.0.0 is incompatible with ^4.0.0 || ^5.0.0.
@MarcAnt this solution worked for me. Thanks!
This solution worked for me
For me “sass-loader” only goes to version “^8.0.2”. Am I missing something here? Im implementing scss into a Create React App & Typescript build.
Try this one. This combination solves my problem. My node version: v16.15.0
"devDependencies": { "node-sass": "^6.0.0", "sass-loader": "^10.2.0", }
Version 11 of sass-loader is too new for webpack4 to cause other problems: ‘this.getOptions is not a function’.Today I got the same issue. For some reason the version 16.3.0 version of Node was installed. I use the macbook pro M1. I went to node.js site and downloaded and installed the 14.17.0 LTS version, and everything works fine.
And now if I follow @okechukwu0127
PS E:\iKum.in\Admin-Redux-Hook> yarn remove node-sass yarn remove v1.22.0 [1/2] Removing module node-sass… [2/2] Regenerating lockfile and installing missing dependencies… warning Lockfile has incorrect entry for “react-bootstrap-sweetalert@^5.2.0”. Ignoring it. Couldn’t find any versions for “react-bootstrap-sweetalert” that matches “^5.2.0” ? Please choose a version of “react-bootstrap-sweetalert” from this list: 5.1.15 info fsevents@2.3.2: The platform “win32” is incompatible with this module. info “fsevents@2.3.2” is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform “win32” is incompatible with this module. info “fsevents@1.2.13” is an optional dependency and failed compatibility check. Excluding it from installation. warning " > @testing-library/user-event@12.8.3" has unmet peer dependency “@testing-library/dom@>=7.21.4”. warning " > @toast-ui/react-chart@1.0.2" has incorrect peer dependency “react@^16.0.0”. warning " > @vtaits/react-color-picker@0.1.1" has incorrect peer dependency “react@^16.3.0”. warning " > @vtaits/react-color-picker@0.1.1" has incorrect peer dependency “react-dom@^16.3.0”. warning " > availity-reactstrap-validation@2.7.1" has incorrect peer dependency “react@^0.14.9 || ^15.3.0 || ^16.0.0”. warning " > availity-reactstrap-validation@2.7.1" has incorrect peer dependency “react-dom@^0.14.9 || ^15.3.0 || ^16.0.0”. warning " > bootstrap@5.0.1" has unmet peer dependency “@popperjs/core@^2.9.2”. warning " > google-maps-react@2.0.6" has incorrect peer dependency “react@~0.14.8 || ^15.0.0 || ^16.0.0”. warning " > google-maps-react@2.0.6" has incorrect peer dependency “react-dom@~0.14.8 || ^15.0.0 || ^16.0.0”. warning " > nouislider-react@3.4.0" has unmet peer dependency “nouislider@>= 11.x”. warning " > react-auth-code-input@1.2.1" has incorrect peer dependency “react@^16.0.0”. warning " > react-bootstrap-editable@0.8.2" has incorrect peer dependency “react@^16.13.1”. warning " > react-bootstrap-editable@0.8.2" has incorrect peer dependency “react-dom@^16.13.1”. warning " > react-bootstrap-table-next@4.0.3" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table-next@4.0.3" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-editor@1.4.0" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-editor@1.4.0" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-paginator@2.1.2" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-paginator@2.1.2" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-toolkit@2.1.3" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-toolkit@2.1.3" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-chartist@0.14.4" has incorrect peer dependency “chartist@^0.10.1”. warning " > react-draft-wysiwyg@1.14.7" has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning “react-draft-wysiwyg > draftjs-utils@0.10.2” has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning “react-draft-wysiwyg > html-to-draftjs@1.5.0” has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning " > react-drawer@1.3.4" has incorrect peer dependency “react@^0.14.7 || ^15.0.0”. warning " > react-dual-listbox@2.1.2" has incorrect peer dependency “react@^15.0.0 || ^16.0.0”. warning " > react-facebook-login@4.1.1" has incorrect peer dependency “react@^16.0.0”. warning " > react-image-lightbox@5.1.1" has incorrect peer dependency “react@^16.x”. warning " > react-image-lightbox@5.1.1" has incorrect peer dependency “react-dom@^16.x”. warning " > react-meta-tags@1.0.1" has incorrect peer dependency “react@^16.6.0”. warning " > react-meta-tags@1.0.1" has incorrect peer dependency “react-dom@^16.6.0”. warning " > react-modal-video@1.2.7" has incorrect peer dependency “react@^16.2.0”. warning " > react-modal-video@1.2.7" has incorrect peer dependency “react-dom@^16.2.0”. warning " > react-rangeslider@2.2.0" has incorrect peer dependency “react@^0.14.0 || ^15.0.0”. warning " > react-rating-tooltip@1.2.0" has incorrect peer dependency “react@^16.8.0”. warning " > react-rating-tooltip@1.2.0" has incorrect peer dependency “react-dom@^16.8.0”. warning " > eslint-plugin-react@7.24.0" has unmet peer dependency “eslint@^3 || ^4 || ^5 || ^6 || ^7”. warning “react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.21.0” has unmet peer dependency “typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta”. warning " > react-toastr@3.0.0" has incorrect peer dependency “react@^15.0.0 || ^16.0.0”. warning " > react-toastr@3.0.0" has incorrect peer dependency “react-dom@^15.0.0 || ^16.0.0”. warning " > react-twitter-auth@0.0.13" has incorrect peer dependency “react@> 15.5.0 < 17”. warning " > react-twitter-auth@0.0.13" has incorrect peer dependency “react-dom@> 15.5.0 < 17”. warning “react-twitter-auth > react-icons@2.2.7” has incorrect peer dependency “react@^0.14.0 || ^15.0.0 || ^16.0.0”. warning “react-twitter-auth > react-icons@2.2.7” has incorrect peer dependency “react-dom@^0.14.0 || ^15.0.0 || ^16.0.0”. warning " > redux-form@8.3.7" has incorrect peer dependency “react@^16.4.2”. warning " > simplebar-react@2.3.3" has incorrect peer dependency “react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0”. warning " > simplebar-react@2.3.3" has incorrect peer dependency “react-dom@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0”. warning " > styled-components@5.3.0" has unmet peer dependency “react-is@>= 16.8.0”. warning " > eslint-config-standard-react@9.2.0" has unmet peer dependency “eslint@>=6.2.2”. warning “eslint-config-standard-react > eslint-config-standard-jsx@8.1.0” has unmet peer dependency “eslint@>=6.2.2”. warning " > sass-loader@12.0.0" has unmet peer dependency “webpack@^5.0.0”. warning Workspaces can only be enabled in private projects. success Uninstalled packages. Done in 16.18s.
PS E:\iKum.in\Admin-Redux-Hook> yarn add node-sass@4.14.1
yarn add v1.22.0 [1/4] Resolving packages… warning Lockfile has incorrect entry for “react-bootstrap-sweetalert@^5.2.0”. Ignoring it. Couldn’t find any versions for “react-bootstrap-sweetalert” that matches “^5.2.0” ? Please choose a version of “react-bootstrap-sweetalert” from this list: 5.1.15 [2/4] Fetching packages… info fsevents@2.3.2: The platform “win32” is incompatible with this module. info “fsevents@2.3.2” is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform “win32” is incompatible with this module. info “fsevents@1.2.13” is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies… warning " > @testing-library/user-event@12.8.3" has unmet peer dependency “@testing-library/dom@>=7.21.4”. warning " > @toast-ui/react-chart@1.0.2" has incorrect peer dependency “react@^16.0.0”. warning " > @vtaits/react-color-picker@0.1.1" has incorrect peer dependency “react@^16.3.0”. warning " > @vtaits/react-color-picker@0.1.1" has incorrect peer dependency “react-dom@^16.3.0”. warning " > availity-reactstrap-validation@2.7.1" has incorrect peer dependency “react@^0.14.9 || ^15.3.0 || ^16.0.0”. warning " > availity-reactstrap-validation@2.7.1" has incorrect peer dependency “react-dom@^0.14.9 || ^15.3.0 || ^16.0.0”. warning " > bootstrap@5.0.1" has unmet peer dependency “@popperjs/core@^2.9.2”. warning " > google-maps-react@2.0.6" has incorrect peer dependency “react@~0.14.8 || ^15.0.0 || ^16.0.0”. warning " > google-maps-react@2.0.6" has incorrect peer dependency “react-dom@~0.14.8 || ^15.0.0 || ^16.0.0”. warning " > nouislider-react@3.4.0" has unmet peer dependency “nouislider@>= 11.x”. warning " > react-auth-code-input@1.2.1" has incorrect peer dependency “react@^16.0.0”. warning " > react-bootstrap-editable@0.8.2" has incorrect peer dependency “react@^16.13.1”. warning " > react-bootstrap-editable@0.8.2" has incorrect peer dependency “react-dom@^16.13.1”. warning " > react-bootstrap-table-next@4.0.3" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table-next@4.0.3" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-editor@1.4.0" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-editor@1.4.0" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-paginator@2.1.2" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-paginator@2.1.2" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-toolkit@2.1.3" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-toolkit@2.1.3" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-chartist@0.14.4" has incorrect peer dependency “chartist@^0.10.1”. warning " > react-draft-wysiwyg@1.14.7" has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning “react-draft-wysiwyg > draftjs-utils@0.10.2” has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning “react-draft-wysiwyg > html-to-draftjs@1.5.0” has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning " > react-drawer@1.3.4" has incorrect peer dependency “react@^0.14.7 || ^15.0.0”. warning " > react-dual-listbox@2.1.2" has incorrect peer dependency “react@^15.0.0 || ^16.0.0”. warning " > react-facebook-login@4.1.1" has incorrect peer dependency “react@^16.0.0”. warning " > react-image-lightbox@5.1.1" has incorrect peer dependency “react@^16.x”. warning " > react-image-lightbox@5.1.1" has incorrect peer dependency “react-dom@^16.x”. warning " > react-meta-tags@1.0.1" has incorrect peer dependency “react@^16.6.0”. warning " > react-meta-tags@1.0.1" has incorrect peer dependency “react-dom@^16.6.0”. warning " > react-modal-video@1.2.7" has incorrect peer dependency “react@^16.2.0”. warning " > react-modal-video@1.2.7" has incorrect peer dependency “react-dom@^16.2.0”. warning " > react-rangeslider@2.2.0" has incorrect peer dependency “react@^0.14.0 || ^15.0.0”. warning " > react-rating-tooltip@1.2.0" has incorrect peer dependency “react@^16.8.0”. warning " > react-rating-tooltip@1.2.0" has incorrect peer dependency “react-dom@^16.8.0”. warning " > eslint-plugin-react@7.24.0" has unmet peer dependency “eslint@^3 || ^4 || ^5 || ^6 || ^7”. warning “react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.21.0” has unmet peer dependency “typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta”. warning " > react-toastr@3.0.0" has incorrect peer dependency “react@^15.0.0 || ^16.0.0”. warning " > react-toastr@3.0.0" has incorrect peer dependency “react-dom@^15.0.0 || ^16.0.0”. warning " > react-twitter-auth@0.0.13" has incorrect peer dependency “react@> 15.5.0 < 17”. warning " > react-twitter-auth@0.0.13" has incorrect peer dependency “react-dom@> 15.5.0 < 17”. warning “react-twitter-auth > react-icons@2.2.7” has incorrect peer dependency “react@^0.14.0 || ^15.0.0 || ^16.0.0”. warning “react-twitter-auth > react-icons@2.2.7” has incorrect peer dependency “react-dom@^0.14.0 || ^15.0.0 || ^16.0.0”. warning " > redux-form@8.3.7" has incorrect peer dependency “react@^16.4.2”. warning " > simplebar-react@2.3.3" has incorrect peer dependency “react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0”. warning " > simplebar-react@2.3.3" has incorrect peer dependency “react-dom@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0”. warning " > styled-components@5.3.0" has unmet peer dependency “react-is@>= 16.8.0”. warning " > eslint-config-standard-react@9.2.0" has unmet peer dependency “eslint@>=6.2.2”. warning “eslint-config-standard-react > eslint-config-standard-jsx@8.1.0” has unmet peer dependency “eslint@>=6.2.2”. warning " > sass-loader@12.0.0" has unmet peer dependency “webpack@^5.0.0”. warning Workspaces can only be enabled in private projects. [4/4] Building fresh packages… error E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass: Command failed. Exit code: 1 Command: node scripts/build.js Arguments: Directory: E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass Output: Building: C:\Program Files\nodejs\node.exe E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli ‘C:\Program Files\nodejs\node.exe’, gyp verb cli ‘E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js’, gyp verb cli ‘rebuild’, gyp verb cli ‘–verbose’, gyp verb cli ‘–libsass_ext=’, gyp verb cli ‘–libsass_cflags=’, gyp verb cli ‘–libsass_ldflags=’, gyp verb cli ‘–libsass_library=’ gyp verb cli ] gyp info using node-gyp@3.8.0 gyp info using node@14.17.0 | win32 | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing “build” directory gyp verb command configure [] gyp verb download using dist-url https://npm.taobao.org/dist gyp verb check python checking for Python executable “python2” in the PATH gyp verb
which
failed Error: not found: python2 gyp verbwhich
failed at getNotFoundError (E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:80:29) gyp verbwhich
failed at E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:89:16 gyp verbwhich
failed at E:\iKum.in\Admin-Redux-Hook\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at E:\iKum.in\Admin-Redux-Hook\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:192:21) gyp verbwhich
failed python2 Error: not found: python2 gyp verbwhich
failed at getNotFoundError (E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:80:29) gyp verbwhich
failed at E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\which\which.js:89:16 gyp verbwhich
failed at E:\iKum.in\Admin-Redux-Hook\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at E:\iKum.in\Admin-Redux-Hook\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:192:21) { gyp verbwhich
failed code: ‘ENOENT’ gyp verbwhich
failed } gyp verb check python checking for Python executable “python” in the PATH gyp verbwhich
succeeded python C:\Python39\python.EXE gyp ERR! configure error gyp ERR! stack Error: Command failed: C:\Python39\python.EXE -c import sys; print “%s.%s.%s” % sys.version_info[:3]; gyp ERR! stack File “<string>”, line 1 gyp ERR! stack import sys; print “%s.%s.%s” % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:319:12) gyp ERR! stack at ChildProcess.emit (events.js:376:20) gyp ERR! stack at maybeClose (internal/child_process.js:1055:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) gyp ERR! System Windows_NT 10.0.19041 gyp ERR! command “C:\Program Files\nodejs\node.exe” “E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=” gyp ERR! cwd E:\iKum.in\Admin-Redux-Hook\node_modules\node-sass gyp ERR! node -v v14.17.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.I tried this as well and still got the same error. 😢
That’s correct. It’s unfortunate that is not easy to upgrade it for
react-scripts
.It helps me !!!
“node-sass”: “^6.0.0”, “ssas-loader”: “^10”,
What worked for me:
I’d recommend to try different sass-loader versions…: https://www.npmjs.com/package/sass-loader?activeTab=versions
Hello @davidkim10
Yes I did all, but its not working.
package.json { “name”: “skote-react-hook”, “version”: “0.1.0”, “private”: true, “dependencies”: { “@fullcalendar/bootstrap”: “^5.5.0”, “@fullcalendar/core”: “^5.5.0”, “@fullcalendar/daygrid”: “^5.5.0”, “@fullcalendar/interaction”: “^5.5.0”, “@fullcalendar/react”: “^5.5.0”, “@lourenci/react-kanban”: “^2.1.0”, “@testing-library/jest-dom”: “^5.11.9”, “@testing-library/react”: “^11.2.3”, “@testing-library/user-event”: “^12.6.0”, “@toast-ui/react-chart”: “^1.0.2”, “@vtaits/react-color-picker”: “^0.1.1”, “apexcharts”: “^3.23.1”, “availity-reactstrap-validation”: “^2.7.0”, “axios”: “^0.21.1”, “axios-mock-adapter”: “^1.19.0”, “bootstrap”: “^5.0.0-beta2”, “chart.js”: “^2.9.4”, “chartist”: “^0.11.4”, “classnames”: “^2.2.6”, “dotenv”: “^8.2.0”, “draft-js”: “^0.11.7”, “echarts”: “^4.9.0”, “echarts-for-react”: “^2.0.16”, “firebase”: “^8.2.3”, “google-maps-react”: “^2.0.6”, “i”: “^0.3.6”, “i18next”: “^19.8.4”, “i18next-browser-languagedetector”: “^6.0.1”, “jsonwebtoken”: “^8.5.1”, “leaflet”: “^1.7.1”, “lodash”: “^4.17.20”, “lodash.clonedeep”: “^4.5.0”, “metismenujs”: “^1.2.1”, “mkdirp”: “^1.0.4”, “moment”: “2.29.1”, “moment-timezone”: “^0.5.32”, “node-sass”: “^6.0.0”, “nouislider-react”: “^3.3.9”, “npm”: “^7.6.3”, “prop-types”: “^15.7.2”, “react”: “^17.0.2”, “react-apexcharts”: “^1.3.7”, “react-auth-code-input”: “^1.0.0”, “react-bootstrap-editable”: “^0.8.2”, “react-bootstrap-sweetalert”: “^5.2.0”, “react-bootstrap-table-next”: “^4.0.3”, “react-bootstrap-table2-editor”: “^1.4.0”, “react-bootstrap-table2-paginator”: “^2.1.2”, “react-bootstrap-table2-toolkit”: “^2.1.3”, “react-chartist”: “^0.14.3”, “react-chartjs-2”: “^2.11.1”, “react-color”: “^2.19.3”, “react-countdown”: “^2.3.1”, “react-cropper”: “^2.1.4”, “react-date-picker”: “^8.0.6”, “react-datepicker”: “^3.4.1”, “react-dom”: “^17.0.2”, “react-draft-wysiwyg”: “^1.14.5”, “react-drag-listview”: “^0.1.8”, “react-drawer”: “^1.3.4”, “react-dropzone”: “^11.2.4”, “react-dual-listbox”: “^2.0.0”, “react-facebook-login”: “^4.1.1”, “react-flatpickr”: “^3.10.6”, “react-google-login”: “^5.2.2”, “react-i18next”: “^11.8.5”, “react-image-lightbox”: “^5.1.1”, “react-input-mask”: “^2.0.4”, “react-jvectormap”: “^0.0.16”, “react-leaflet”: “^3.0.5”, “react-meta-tags”: “^1.0.1”, “react-modal-video”: “^1.2.6”, “react-perfect-scrollbar”: “^1.5.8”, “react-rangeslider”: “^2.2.0”, “react-rating”: “^2.0.5”, “react-rating-tooltip”: “^1.1.6”, “react-redux”: “^7.2.2”, “react-responsive-carousel”: “^3.2.11”, “react-router-dom”: “^5.2.0”, “react-script”: “^2.0.5”, “react-scripts”: “4.0.1”, “react-select”: “^3.2.0”, “react-sparklines”: “^1.7.0”, “react-star-ratings”: “^2.3.0”, “react-super-responsive-table”: “^5.2.0”, “react-switch”: “^6.0.0”, “react-table”: “^7.6.3”, “react-toastr”: “^3.0.0”, “react-twitter-auth”: “0.0.13”, “reactstrap”: “^8.8.1”, “recharts”: “^2.0.8”, “redux”: “^4.0.5”, “redux-form”: “^8.3.7”, “redux-saga”: “^1.1.3”, “simplebar-react”: “^2.3.0”, “styled-components”: “^5.2.1”, “toastr”: “^2.1.4” }, “scripts”: { “start”: “react-scripts start”, “build”: "react-scripts build ", “lint”: “eslint .”, “format”: “prettier --write "**/*.{js,jsx,json,md,html,css,less,scss}"”, “test”: “react-scripts test”, “eject”: “react-scripts eject” }, “eslintConfig”: { “extends”: [ “eslint:recommended”, “plugin:react/recommended” ], “parser”: “babel-eslint”, “parserOptions”: { “ecmaVersion”: 2020, “sourceType”: “module”, “ecmaFeatures”: { “jsx”: true } }, “env”: { “browser”: true, “es6”: true }, “globals”: { “$”: true }, “settings”: { “react”: { “version”: “^17.0.1” } }, “rules”: { “semi”: [ “error”, “never” ] } }, “browserslist”: { “production”: [ “>0.2%”, “not dead”, “not op_mini all” ], “development”: [ “last 1 chrome version”, “last 1 firefox version”, “last 1 safari version” ] }, “resolutions”: { “moment”: “2.29.1” }, “devDependencies”: { “eslint-config-standard-react”: “^9.2.0”, “eslint-plugin-react”: “^7.20.6”, “prettier”: “^2.1.1”, “node-sass”: “^6.0.0”, “sass-loader”: “^12.0.0” } }
PS E:\iKum.in\Admin-Redux-Hook> node --version v14.17.0 PS E:\iKum.in\Admin-Redux-Hook> npm -v
6.14.13 PS E:\iKum.in\Admin-Redux-Hook> yarn install
yarn install v1.22.0 [1/4] Resolving packages… warning Lockfile has incorrect entry for “react-bootstrap-sweetalert@^5.2.0”. Ignoring it. Couldn’t find any versions for “react-bootstrap-sweetalert” that matches “^5.2.0” ? Please choose a version of “react-bootstrap-sweetalert” from this list: 5.1.15 [2/4] Fetching packages… info fsevents@2.3.2: The platform “win32” is incompatible with this module. info “fsevents@2.3.2” is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform “win32” is incompatible with this module. info “fsevents@1.2.13” is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies… warning " > @testing-library/user-event@12.8.3" has unmet peer dependency “@testing-library/dom@>=7.21.4”. warning " > @toast-ui/react-chart@1.0.2" has incorrect peer dependency “react@^16.0.0”. warning " > @vtaits/react-color-picker@0.1.1" has incorrect peer dependency “react@^16.3.0”. warning " > @vtaits/react-color-picker@0.1.1" has incorrect peer dependency “react-dom@^16.3.0”. warning " > availity-reactstrap-validation@2.7.1" has incorrect peer dependency “react@^0.14.9 || ^15.3.0 || ^16.0.0”. warning " > availity-reactstrap-validation@2.7.1" has incorrect peer dependency “react-dom@^0.14.9 || ^15.3.0 || ^16.0.0”. warning " > bootstrap@5.0.1" has unmet peer dependency “@popperjs/core@^2.9.2”. warning " > google-maps-react@2.0.6" has incorrect peer dependency “react@~0.14.8 || ^15.0.0 || ^16.0.0”. warning " > google-maps-react@2.0.6" has incorrect peer dependency “react-dom@~0.14.8 || ^15.0.0 || ^16.0.0”. warning " > nouislider-react@3.4.0" has unmet peer dependency “nouislider@>= 11.x”. warning " > react-auth-code-input@1.2.1" has incorrect peer dependency “react@^16.0.0”. warning " > react-bootstrap-editable@0.8.2" has incorrect peer dependency “react@^16.13.1”. warning " > react-bootstrap-editable@0.8.2" has incorrect peer dependency “react-dom@^16.13.1”. warning " > react-bootstrap-table-next@4.0.3" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table-next@4.0.3" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-editor@1.4.0" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-editor@1.4.0" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-paginator@2.1.2" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-paginator@2.1.2" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-bootstrap-table2-toolkit@2.1.3" has incorrect peer dependency “react@^16.3.0”. warning " > react-bootstrap-table2-toolkit@2.1.3" has incorrect peer dependency “react-dom@^16.3.0”. warning " > react-chartist@0.14.4" has incorrect peer dependency “chartist@^0.10.1”. warning " > react-draft-wysiwyg@1.14.7" has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning “react-draft-wysiwyg > draftjs-utils@0.10.2” has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning “react-draft-wysiwyg > html-to-draftjs@1.5.0” has unmet peer dependency “immutable@3.x.x || 4.x.x”. warning " > react-drawer@1.3.4" has incorrect peer dependency “react@^0.14.7 || ^15.0.0”. warning " > react-dual-listbox@2.1.2" has incorrect peer dependency “react@^15.0.0 || ^16.0.0”. warning " > react-facebook-login@4.1.1" has incorrect peer dependency “react@^16.0.0”. warning " > react-image-lightbox@5.1.1" has incorrect peer dependency “react@^16.x”. warning " > react-image-lightbox@5.1.1" has incorrect peer dependency “react-dom@^16.x”. warning " > react-meta-tags@1.0.1" has incorrect peer dependency “react@^16.6.0”. warning " > react-meta-tags@1.0.1" has incorrect peer dependency “react-dom@^16.6.0”. warning " > react-modal-video@1.2.7" has incorrect peer dependency “react@^16.2.0”. warning " > react-modal-video@1.2.7" has incorrect peer dependency “react-dom@^16.2.0”. warning " > react-rangeslider@2.2.0" has incorrect peer dependency “react@^0.14.0 || ^15.0.0”. warning " > react-rating-tooltip@1.2.0" has incorrect peer dependency “react@^16.8.0”. warning " > react-rating-tooltip@1.2.0" has incorrect peer dependency “react-dom@^16.8.0”. warning " > eslint-plugin-react@7.24.0" has unmet peer dependency “eslint@^3 || ^4 || ^5 || ^6 || ^7”. warning “react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.21.0” has unmet peer dependency “typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta”. warning " > react-toastr@3.0.0" has incorrect peer dependency “react@^15.0.0 || ^16.0.0”. warning " > react-toastr@3.0.0" has incorrect peer dependency “react-dom@^15.0.0 || ^16.0.0”. warning " > react-twitter-auth@0.0.13" has incorrect peer dependency “react@> 15.5.0 < 17”. warning " > react-twitter-auth@0.0.13" has incorrect peer dependency “react-dom@> 15.5.0 < 17”. warning “react-twitter-auth > react-icons@2.2.7” has incorrect peer dependency “react@^0.14.0 || ^15.0.0 || ^16.0.0”. warning “react-twitter-auth > react-icons@2.2.7” has incorrect peer dependency “react-dom@^0.14.0 || ^15.0.0 || ^16.0.0”. warning " > redux-form@8.3.7" has incorrect peer dependency “react@^16.4.2”. warning " > simplebar-react@2.3.3" has incorrect peer dependency “react@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0”. warning " > simplebar-react@2.3.3" has incorrect peer dependency “react-dom@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0”. warning " > styled-components@5.3.0" has unmet peer dependency “react-is@>= 16.8.0”. warning " > eslint-config-standard-react@9.2.0" has unmet peer dependency “eslint@>=6.2.2”. warning “eslint-config-standard-react > eslint-config-standard-jsx@8.1.0” has unmet peer dependency “eslint@>=6.2.2”. warning " > sass-loader@12.0.0" has unmet peer dependency “webpack@^5.0.0”. warning Workspaces can only be enabled in private projects. [4/4] Building fresh packages… success Saved lockfile. Done in 20.59s.
And finally the error is:
Failed to compile ./src/assets/scss/theme.scss (./node_modules/css-loader/dist/cjs.js??ref–5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref–5-oneOf-6-3!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ref–5-oneOf-6-4!./src/assets/scss/theme.scss) Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
This is not working for me., i am using the latest version of node.
Thats the correct answer.
node-sass
is deprecated, you have to switch tosass
funciona para mi
That works for me too. Thanks!
Same solution that worked for me
worked for me
完美解决了我遇到的问题 感谢感谢
i’m shocked but this worked for me
works for me
Its not working for me as well.
Node version : 16.03.0 Node-sass : 6.0.0 npm: ^7.6.3"
added “devDependencies”: { “node-sass”: “^6.0.0”, “sass-loader”: “^12.0.0” }
but still I get the the following error.
@duc-talentwunder create-react-app adds
sass-loader
to webpack configuration so I believe this is the same problemhttps://github.com/facebook/create-react-app/blob/fddce8a9e21bf68f37054586deb0c8636a45f50b/packages/react-scripts/config/webpack.config.js#L585
yarn remove node-sass && yarn add sass
I’m usingsass
instead.I had the same Issue. My solution was. Switch from node-sass to sass. After that it was not working. So i have also updated my old “react-scripts”: “^3.4.1” to “react-scripts”: “^5.0.0”. And then magic, it works. I use this with node 16.8.
"sass": "^1.49.0", "sass-loader": "^10",
When I tried to compile my project with “yarn hot or yarn watch” I had the same error. I fixed it like this:
yarn remove sass-loader
yarn remove node-sass
and after that I delete “node_modules” directory + package.lock file… then:yarn add sass-loader@^7.0.1 node-sass --dev
after that, you can run your project without problem 😃
delete yarn.lock remove node_modules
yarn add node-sass@latest sass-loader@latest
Update version is here
"devDependencies": { "sass-loader": "^12.1.0", "node-sass": "^6.0.1" }
When i tried first i came same error. After that i delete yarn.lock file and node_modules folder and then run
yarn install
now it’s workingI got into this issue today. Has anyone a final solution for it? The ones mentioned above don’t work me.
Thanks Daniel. I do used Create React App to run my react projects, I used node-sass v14 which was working well with my initial version of Node, after updating my node to v16 some days ago, the node-sass stopped working, I’ve tried updating the node-sass to the latest version(v16) but I’m still getting the error.
Hello.
This work for me!! Thanks.
This solved my issue. Super!
@AlbertoPaulPopescu Of all the options in this thread this one seems to work perfectly well. Thank you.
I resolved it already. I installed an earlier and compatible Version of node and node-sass on my machine and It worked
How is that working for node 16^
only works when node-sass is a top-level dependency, but not when it’s installed as a module dependency, i.e. Create React App.
thank you very much!
I am using
“sass-loader”: “^11.1.1”, “node-sass”: “^6.0.0”,
and still getting error: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
Already deleted node_modules and lock file and installed everything again.
For those of you who want a workaround… I have downgraded to Version 5… I will let you know if I encounter any major issues