node-sass 模塊報(bào)錯、老是安裝不上?
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這個模塊很坑爹,一直報(bào)錯安裝不上,試了各種辦法。
用了npm install 、cnpm install 、yarn install 都不行。
后來發(fā)現(xiàn)是node-sass模塊對node版本有兼容性,版本不適配,就容易報(bào)錯。
下圖是node-sass和 node的對應(yīng)的版本

node-sass模塊 對于node版本.png

image.gif
如果切換node版本后,仍然報(bào)錯,嘗試重新構(gòu)建下 node-sass模塊
在項(xiàng)目目錄下打開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>