【问题标题】:I got the following error in node version 8+我在节点版本 8+ 中收到以下错误
【发布时间】:2018-06-27 01:15:00
【问题描述】:

以前的节点版本是 7.9.0。该项目运行良好。 当我将它升级到 8.9.4 时,出现以下错误。

ERROR in ./node_modules/css-loader?{"sourceMap":false,"import":false}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/sass/styles.scss
Module build failed: Error: Missing binding F:\LogicSoft-SRL\angular-frontdesk\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 7.x

如何在当前版本(8.9.4)中修复此错误?

【问题讨论】:

  • 尝试删除 node_modules 文件夹并再次 npm install。或者只是从 node_modules 中删除 node-sass 文件夹,然后再次 npm install。

标签: node.js css-modules


【解决方案1】:

从错误消息来看,您似乎必须为您的节点版本重建 node-sass。您可以通过运行此answer 中的命令来执行此操作。

npm rebuild node-sass

你可以找到更多关于重建命令here的信息。

【讨论】:

    猜你喜欢
    • 2023-02-16
    • 1970-01-01
    • 2020-08-08
    • 2018-11-24
    • 2023-03-05
    • 2021-02-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多