node-sass 模塊報(bào)錯(cuò)倍阐、老是安裝不上?
Syntax Error: Error: Missing binding D:\code\xxxx\node_modules\node-sass\vendor\win32-x64-83\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 14.x
Found bindings for the following environments:
- Windows 64-bit with Unsupported runtime (93)
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
image.gif
node-sass這個(gè)模塊很坑爹薄腻,一直報(bào)錯(cuò)安裝不上收捣,試了各種辦法。
用了npm install 庵楷、cnpm install 罢艾、yarn install 都不行。
后來(lái)發(fā)現(xiàn)是node-sass模塊對(duì)node版本有兼容性尽纽,版本不適配咐蚯,就容易報(bào)錯(cuò)。
下圖是node-sass和 node的對(duì)應(yīng)的版本
node-sass模塊 對(duì)于node版本.png
image.gif
如果切換node版本后弄贿,仍然報(bào)錯(cuò)春锋,嘗試重新構(gòu)建下 node-sass模塊
在項(xiàng)目目錄下打開(kāi)cmd:
輸入命令: npm rebuild node-sass
然后再更新一下:npm update
image.gif
或者刪除原先的node-pass,然后cnpm install node-pass 都可以
看下效果差凹,運(yùn)行順利
image.png
<figcaption class="cke_widget_editable" contenteditable="true" data-cke-display-name="標(biāo)題" data-cke-enter-mode="2" data-cke-filter="74" data-cke-widget-editable="caption">標(biāo)題</figcaption>