首页 > 解决方案 > Node Sass 尚不支持您当前的环境:Linux 64-bit with Unsupported runtime (88) on debian 10

问题描述

以下是节点和包版本npm:7.4.0, node:15.6.0dociql:1.1.3我使用了找到的解决方案,例如npm rebuild node-sass, npm uninstall --save-dev node-sassnpm install --save-dev node-sass但它们都不起作用。根据官方文档,对于节点 15.x,node-sass:5.0+ 是合适的版本。我不知道究竟是什么导致了这个问题。

    /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

标签: node.jsnpmnode-sass

解决方案


由于您在 Linux 上运行,每个 [1] 的可用版本为 0 到 14,因此不支持 15.x - 尝试切换到 14.x(有诸如 nvm 之类的工具用于快速切换节点版本)。

一般来说,如果你可以使用 dart-sass [2] 而不是 node-sass - 我强烈推荐它 - 可以节省大量像这样的头痛并且效果很好(相同的语言和所有东西;只是一个不同的编译器(在 dart 中)vs c++ with它是在 node-sass 中引起很多问题的绑定)。

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

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


推荐阅读