node.js - Node Sass 尚不支持您当前的环境:Linux 64-bit with Unsupported runtime (88) on debian 10
问题描述
以下是节点和包版本npm:7.4.0
, node:15.6.0
,dociql:1.1.3
我使用了找到的解决方案,例如npm rebuild node-sass
, npm uninstall --save-dev node-sass
,npm 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
解决方案
由于您在 Linux 上运行,每个 [1] 的可用版本为 0 到 14,因此不支持 15.x - 尝试切换到 14.x(有诸如 nvm 之类的工具用于快速切换节点版本)。
一般来说,如果你可以使用 dart-sass [2] 而不是 node-sass - 我强烈推荐它 - 可以节省大量像这样的头痛并且效果很好(相同的语言和所有东西;只是一个不同的编译器(在 dart 中)vs c++ with它是在 node-sass 中引起很多问题的绑定)。
推荐阅读
- android - Android - java,将位置数据从一个类发送到活动视图
- regex - 如何修复“正则表达式中未转义的左大括号在正则表达式中是非法的”错误?
- coq - Coq:一元到二进制的转换
- node.js - 部署的 Nodejs 服务在 Azure Web App 上不起作用
- r - 当我将标签添加到 geom_bar 时,如何阻止图形发生变化?
- selenium - 无头镀铬慢启动
- python - python中是否有换行符,就像
HTML中有a - amazon-web-services - 有没有办法暂时停止 AWS Kinesis Stream?
- arrays - 将表示二进制数的整数数组转换为十进制数
- android - 多行 React-Native Text 组件的宽度不会调整为 Android 上最长文本行的长度