簡體   English   中英

錯誤:Node Sass 尚不支持您當前的環境:OS X 64-bit with Unsupported runtime (72)

[英]Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (72)

我正在使用 macOS Catalina 10.15.3。

我正在使用這個Jekyll 主題生成縮略圖,當我輸入gulp img時,會發生該錯誤。

Requiring external module babel-register
~/node_modules/node-sass/lib/binding.js:13
      throw new Error(errors.unsupportedEnvironment());
      ^

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (72)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.1
    at module.exports (~/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (~/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Object.require.extensions.<computed> [as .js] (~/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (~/node_modules/gulp-sass/index.js:187:21)

我嘗試了所有方法,例如npm installnpm uninstallnpm rebuild node-sass等等,但我不知道為什么會出現錯誤。

我有同樣的問題。 對我來說,它有助於重新安裝 NodeJs(在我的例子中是 14.15.1 LTS),然后是已經提到的命令:

npm rebuild node-sass

我有同樣的問題。 嘗試使用其他答案在最近的 Mac OS 更新后重建 node-sass。 切換到 Dart Sass 是我在更新 node、npm、重新安裝所有包和重建 node-sass 之后的最后手段。

不推薦使用 node-sass 以支持 dart sass:

https://www.npmjs.com/package/node-sass

https://sass-lang.com/dart-sass

卸載 node-sass 並安裝 sass 后,我在進行 yarn build 時仍然收到警告,但我的 react 項目正在再次構建。

npm uninstall node-sass
npm install sass

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM