1

Here are the node and package versions npm:7.4.0, node:15.6.0, dociql:1.1.3 and I have used found solutions like npm rebuild node-sass, npm uninstall --save-dev node-sass, npm install --save-dev node-sass but none of them worked. With node 15.x, node-sass:5.0+ is the suitable version according to official docs. I don't know what exactly is causing the issue.

    /usr/lib/node_modules/dociql/node_modules/node-sass/lib/binding.js:13
      throw new Error(errors.unsupportedEnvironment());
      ^
Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
    at module.exports (/usr/lib/node_modules/dociql/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/usr/lib/node_modules/dociql/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (/usr/lib/node_modules/dociql/node_modules/coffeescript/lib/coffeescript/register.js:53:36)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/usr/lib/node_modules/dociql/app/lib/config.js:2:14)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (/usr/lib/node_modules/dociql/node_modules/coffeescript/lib/coffeescript/register.js:53:36)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at module.exports (/usr/lib/node_modules/dociql/index.js:61:18)
    at Object.<anonymous> (/usr/lib/node_modules/dociql/bin/dociql.js:40:1)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47
blackPanther
  • 181
  • 1
  • 3
  • 14

1 Answers1

1

Since you're running on Linux, the available versions, per [1], are 0 through 14, so 15.x is not supported -- try switching to 14.x (there are tools like nvm for quick switching node versions).

In general, if you can use dart-sass [2] instead of node-sass - I highly recommend it - saves loads of headaches like this and works great (same language & everything; just a different compiler (in dart) vs c++ with it's bindings that cause lots of issues in node-sass).

[1] https://github.com/sass/node-sass/releases/tag/v4.14.1

[2] https://www.npmjs.com/package/sass

  • 1
    Thanks for the detailed answer. I reason I have node 15.x is that dociql is not working with 14 or lesser versions. I feel stuck. – blackPanther Jan 20 '21 at 23:43
  • are you using `node-sass` as a direct dependency? if so - definitely try out dart-sass; otherwise not sure – Kipras Melnikovas Jan 20 '21 at 23:46
  • Sorry, no idea what you mean by direct dependency but will try out dart-sass. – blackPanther Jan 20 '21 at 23:49
  • I'm asking if you're installing `node-sass` yourself to use it to compile `sass`, or is `node-sass` a dependency of something you installed, so, an indirect dependency. If it is direct - you can change to dart-sass; otherwise you cannot really edit some package's code without it getting messy. – Kipras Melnikovas Jan 20 '21 at 23:51
  • dart-sass didn't work either. Gave me back the same error. @Kipras – blackPanther Jan 20 '21 at 23:52
  • you mean `dart-sass` right? I would then consider changing your nodejs version to v14.x and trying to run `node-sass` with the whole install & rebuild thing you mentioned in your question. Also, `rm -rf node_modules/` sometimes helps before re-installing:D – Kipras Melnikovas Jan 20 '21 at 23:53
  • 1
    Yeah, I installed node-sass myself, so I guess it's a direct dependency. – blackPanther Jan 20 '21 at 23:53
  • 1
    Okay, thank you I'll give it a shot with 14.x – blackPanther Jan 20 '21 at 23:54
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/227618/discussion-between-kipras-and-blackpanther). – Kipras Melnikovas Jan 20 '21 at 23:57