【问题标题】:Node Sass could not find a binding for your current environment: Linux 32-bit with Node.js 12.xNode Sass 找不到当前环境的绑定:Linux 32-bit with Node.js 12.x
【发布时间】:2021-04-06 01:03:17
【问题描述】:

当我尝试编译我的 sass 文件 (node-sass -o css/ css/) 时,我遇到了 Node Sass could not find a binding for your current environment 错误。我遵循了类似的question,但提到的npm脚本都没有解决npm rebuild node-sass之类的问题,或者删除node_modules并运行npm install

我在answer 中读到,如果没有任何 npm 脚本可以解决问题,那么您必须下载丢失的绑定并将其放在适当的目标文件夹中。

在我的情况下,错过的绑定是错误消息中提到的linux-ia32-72_binding.node

Error: Missing binding /home/saad/Documents/bOGnMCzEEeiTdA5yoE99Fg_6da6f2f02cc411e8b484f7e801bd0278_Bootstrap4-starter/Bootstrap4/conFusion/node_modules/node-sass/vendor/linux-ia32-72/binding.node
Node Sass could not find a binding for your current environment: Linux 32-bit with Node.js 12.x

问题是我没有找到绑定here去下载!我找到的最后一个版本是linux-ia32-51_binding.node

我的sass文件现在编译不出来,强制在线编译,请问如何解决?

注意:npm 版本为npm@7.0.5,node 版本为node@v12.18.4

更新:当我运行 uname -m 时,输出是 x86_64,这意味着我的 linux 是 64 位的,所以为什么错误说 Node Sass could not find a binding for your current environment: Linux 32-bit

【问题讨论】:

    标签: node.js npm sass node-modules node-sass


    【解决方案1】:

    Node 在 v10 及更高版本中不再支持 x86,因此 node-sass 没有适用于 Node 12 (72) 的“ia32”。您可以在此处查看支持的最低 node-sass 版本https://github.com/sass/node-sass#node-version-support-policy

    【讨论】:

    • 所以如果我安装了 node v8 它可能适用于我的 32 位系统?
    • 是的,除了节点 8 现在已经结束生命周期
    猜你喜欢
    • 2022-07-19
    • 2021-02-19
    • 1970-01-01
    • 2017-04-15
    • 1970-01-01
    • 2016-09-16
    • 2016-10-25
    • 2021-02-15
    • 1970-01-01
    相关资源
    最近更新 更多