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.

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. Commented Mar 3, 2020 at 14:44
  • @MattOestreich When I run node --version, it says that I'm currently using v12.16.1 now. Commented Mar 3, 2020 at 14:46
  • Looks like it may be an issue with one of the dependencies you are using.. See here Commented Mar 3, 2020 at 14:48
  • @MattOestreich How can I find the old dependencies and upgrade them? Commented Mar 3, 2020 at 14:52
  • Search your node_modules via a file search...... Commented Mar 3, 2020 at 14:54

3 Answers 3

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 
Sign up to request clarification or add additional context in comments.

3 Comments

Good job my bro.
@Samuel,I hope my answer could help you. If it is so, you could set my answer as correct. Thx
What would be the yarn equivalent?
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 

Comments

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.