Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (72)
Asked Answered
G

3

7

I'm using macOS Catalina 10.15.3.

I'm generating thumbnail images with this Jekyll theme, and when I enter gulp img, that error occurs.

Requiring external module babel-register
~/node_modules/node-sass/lib/binding.js:13
      throw new Error(errors.unsupportedEnvironment());
      ^

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (72)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.1
    at module.exports (~/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (~/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Object.require.extensions.<computed> [as .js] (~/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (~/node_modules/gulp-sass/index.js:187:21)

I tried everything, like npm install, npm uninstall, npm rebuild node-sass, and so on, but I don't know why the error appears.

Genuflect answered 3/3, 2020 at 14:33 Comment(8)
What version of node are you running? node --version - it looks like you're running an outdated version of Node Sass... The error message you are getting points to a link for v4.7.1 - but v4.13.1 is the newest release...Also, have a look at other issues that people have filed for the same error, as they offer resolutions.Schoenfelder
@MattOestreich When I run node --version, it says that I'm currently using v12.16.1 now.Genuflect
Looks like it may be an issue with one of the dependencies you are using.. See hereSchoenfelder
@MattOestreich How can I find the old dependencies and upgrade them?Genuflect
Search your node_modules via a file search......Schoenfelder
@MattOestreich Should I look over package.json or the folder named node_modules at the root of the project?Genuflect
The folder called node_modules.Schoenfelder
I have the same problem ... with a Vue application ... on MacOS 10.15.5Prescription
B
8

I had the same problem. For me it helped to reinstall NodeJs (in my case 14.15.1 LTS) and then the already mentioned command:

npm rebuild node-sass
Bleeding answered 23/11, 2020 at 10:32 Comment(3)
Good job my bro.Inversely
@Samuel,I hope my answer could help you. If it is so, you could set my answer as correct. ThxBleeding
What would be the yarn equivalent?Irrationality
S
3

I had the same problem. Tried to rebuild node-sass after the most recent Mac OS update using other answers. Switching to Dart Sass was my last resort after update node, npm, reinstalling all packages and rebuilding node-sass.

node-sass is deprecated in favor of dart sass:

https://www.npmjs.com/package/node-sass

https://sass-lang.com/dart-sass

After uninstalling node-sass and installing sass, I still get warnings when doing yarn build, but my react project is building again.

npm uninstall node-sass
npm install sass
Shanna answered 23/5, 2022 at 13:50 Comment(0)
G
0

In addition to Charles Letcher's response above, I wanted to add that the npm sass version also works for those on ARM/M1 architecture.

I took my existing Gulp project and installed sass on Node v14 and Node v16. Once this happened, my project launched flawlessly.

Generate answered 6/10, 2022 at 22:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.