Reputation: 113
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.
Upvotes: 7
Views: 8380
Reputation: 41
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.
Upvotes: 0
Reputation: 91
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
Upvotes: 3
Reputation: 767
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
Upvotes: 8