簡體   English   中英

Node Sass 還不支持你當前的環境:Windows 64-bit with Unsupported runtime

[英]Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime

我在使用 nodejs 時遇到了一些問題。 我總是使用 nodejs 在我的 HTML 項目中使用 gulp 和 sass。 在出現以下錯誤之前從未遇到過問題: Node Sass 尚不支持您當前的環境:Windows 64-bit with Unsupported runtime (57)。 我已經全局安裝了 npm:npm -g install gulp。 然后我總是可以輸入gulp然后我的 HTML 頁面工作了,但現在我得到了上述錯誤。

我究竟做錯了什么?

PS:希望我能很好地使用stackoverflow,這是我的第一個問題,如果我做錯了,請道歉......

我猜你的節點版本可能高於節點 js 9

下面堆棧跟蹤中的鏈接幫助我解決了這個問題。

Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.7.2

此鏈接( https://github.com/sass/node-sass/releases/tag/v4.7.2 )清楚地顯示了支持的節點版本。

    OS      Architecture    Node
    Windows x86 & x64       0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9
    ...     ...             ...    

我使用的node 10.15.3顯然不受支持。 所以,將節點版本降級到8.11.1 ,再次執行npm install 收到以下消息。

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 Unsupported runtime (64)

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.

按照建議,運行npm rebuild node-sass --force 問題就解決了。

運行此命令可解決此問題。

npm rebuild node-sass

如果這不起作用,請在下面使用:

npm rebuild node-sass --force

在路徑中使用 python 2.7.* 而不是 3.* 然后重新安裝 node-sass npm uninstall node-sass && npm install node-sass正如其他主題中提到的那樣對我npm uninstall node-sass && npm install node-sass

所以檢查你的python --version可能是開始的事情。

您可以嘗試npm卸載node-sass和&npm install node-sass(必要時使用-g)。

重復問題: https ://stackoverflow.com/a/59025839/1708333

這是 Node 版本的常見 node-sass 版本兼容性問題。

快速破解:

卸載並重新安裝node-sass ,它會為自己找到丟失的二進制文件。

npm uninstall --save-dev node-sass
npm install --save-dev node-sass

永久解決方案:

如果使用上述命令無法解決問題,則可能是您的節點版本有問題。 檢查您的節點版本是否支持 node-sass 版本。 選擇一個穩定的節點版本並重復上述命令來解決這個問題。

下面是該節點與 node-sass 的兼容性表:-

NodeJS | Supported node-sass version | Node Module
Node 17     7.0+                        102
Node 16     6.0+                        93
Node 15     5.0+                        88
Node 14     4.14+                       83
Node 13     4.13+, <5.0                 79
Node 12     4.12+                       72
Node 11     4.10+, <5.0                 67
Node 10     4.9+, <6.0                  64
Node 8      4.5.3+, <5.0                57
Node <8     <5.0                        <57

如果問題仍未解決,請查看 node-sass 支持的環境列表:- https://github.com/sass/node-sass/releases/

暫無
暫無

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

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