Node-sass: [Unsupported] Installing node-sass 4.7.2 on Node 12

Created on 22 Oct 2019  ·  6Comments  ·  Source: sass/node-sass

Hi,

when I try to use node-sass in Terminal, even just to get the version number node-sass -v, I get the following output:

/usr/local/lib/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.2
    at module.exports (/usr/local/lib/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/node-sass/bin/node-sass:10:10)
    at Module._compile (internal/modules/cjs/loader.js:956:30)

I'm not sure what changed on my system, because everything used to run fine a few days ago, before installing https://github.com/javascript-obfuscator/javascript-obfuscator.

I have already tried the common solutions, like running npm rebuild node-sass or rm -rf node_modules/node-sass && npm i

I believe I have the newest versions of everything:

  • macOS X Catalina Version 10.15 (19A583) on a MacBook Pro (15-inch, 2016)
  • NPM version (npm -v): 6.12.0
  • Node version (node -v): v12.13.0
  • Node Process (node -p process.versions):
{
  node: '12.13.0',
  v8: '7.7.299.13-node.12',
  uv: '1.32.0',
  zlib: '1.2.11',
  brotli: '1.0.7',
  ares: '1.15.0',
  modules: '72',
  nghttp2: '1.39.2',
  napi: '5',
  llhttp: '1.1.4',
  http_parser: '2.8.0',
  openssl: '1.1.1d',
  cldr: '35.1',
  icu: '64.2',
  tz: '2019a',
  unicode: '12.1'
}
  • 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   4.12.0  (Wrapper)   [JavaScript]
libsass     3.5.4   (Sass Compiler) [C/C++]
  • npm node-sass versions (npm ls node-sass):
[email protected] /Users/MYNAME
└── [email protected] 
Invalid - Old Node-Sass

Most helpful comment

You have upgraded your node engine to 12.
Looks like you got node-sass 4.7.2 installed globally in /usr/local/lib/node_modules/node-sass.

Please remove that and make sure only 4.12.0 is available.

In my case I had to remove package-lock after upgrading to 12, it started working afterwards
Thanks!

All 6 comments

You have upgraded your node engine to 12.
Looks like you got node-sass 4.7.2 installed globally in /usr/local/lib/node_modules/node-sass.

Please remove that and make sure only 4.12.0 is available.

@saper I just upgraded to Node.js v13.0.0 and am getting a similar error.

I think it might be because v13.0.0 isn't listed here:

https://github.com/sass/node-sass/blob/8d0accabd61ee5cb16248474f2989209b6200e50/lib/extensions.js#L76-L81

Yes, do not use node.js 13 with node-sass unless you are willing to resolve all issues yourself :)

@saper ok I'll close my PR then #2764

You have upgraded your node engine to 12.
Looks like you got node-sass 4.7.2 installed globally in /usr/local/lib/node_modules/node-sass.

Please remove that and make sure only 4.12.0 is available.

In my case I had to remove package-lock after upgrading to 12, it started working afterwards
Thanks!

Thanks @saper! only update node-sass with the next line <-- npm install node-sass --> ¡y listo!

Was this page helpful?
0 / 5 - 0 ratings