Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)

Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)

安装最新版本 node.js (v16.13.1) 后出现以下错误

Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93) For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v4.14.1 I have created static pages for my application and use sass and gulp

我有一个静态页面并在页面中使用 Sass 并在浏览器上使用 gulp 到 运行。(npm 安装)。以下是适用于我的应用程序的版本:

Package.json 文件

"scripts": {
              "start": "gulp watch"
    },
"dependencies": {
        "@fortawesome/fontawesome-free": "5.15.1",
        "@ttskch/select2-bootstrap4-theme": "^1.5.2",
        "bootstrap": "4.5.3",
        "bootstrap-datepicker": "^1.9.0",
        "jquery": "3.5.1",
        "jquery.easing": "^1.4.1",
        "select2": "^4.1.0-rc.0",
        "gulp": "4.0.2"
    },
    "devDependencies": {
        "browser-sync": "2.26.13",
        "del": "6.0.0",
        "gulp": "4.0.2",
        "gulp-autoprefixer": "7.0.1",
        "gulp-clean-css": "4.3.0",
        "gulp-header": "2.0.9",
        "gulp-plumber": "^1.2.1",
        "gulp-rename": "2.0.0",
        "gulp-sass": "4.1.0",
        "gulp-uglify": "3.0.2",
        "merge-stream": "2.0.0"
    }

即使使用命令 npm rebuild node-sass 也没有改变任何东西。

gulp-sass 4.1.0 使用 node-sass 4, and node-sass 4 does not support Node.js 16, as indicated in this table.

为支持Node.js16,升级gulp-sass:今天最新版本为5.1.0:

npm install -D gulp-sass@5.1.0

这将为您提供 node-sass 7,它支持 Node.js 的所有当前版本,包括 Node.js 16.