日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Missing binding node_modules/node-sass/vendor/darwin-x64-72/binding.node

發布時間:2023/12/10 编程问答 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Missing binding node_modules/node-sass/vendor/darwin-x64-72/binding.node 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

起因是我換了電腦,將代碼從git上把代碼down下來之后
?

yarn //安裝依賴 等同于install npm run serve //運行程序

先報了一個錯誤,分析原因是node版本過高,node-sass不支持,然后我看了一下當前電腦版本node@17.+,之前的電腦版本node版本是 v14.16.1,接下來想那就版本一致吧,

Mac切換node版本

npm install -g n //安裝n node版本管理 sudo n 14.16.1 // 切換安裝到node@14.16.1版本

然后運行代碼后,報了如下錯誤

error: Missing binding YOUR_PROJECT_PATH/node_modules/node-sass/vendor/darwin-x64-72/binding.node Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 12.xFound bindings for the following environments:- OS X 64-bit with Node.js 12.xThis usually happens because your environment has changed since running `npm install`. Run `npm rebuild node-sass` to download the binding for your current environment.

按照提示嘗試執行?npm install ?和?npm rebuild node-sass 無果后換個思路解決問題。

問題解析:

在目錄下 找不到darwin-x64-72/binding.node文件 那我們解決這個問題就好了


解決辦法:

1、找到node-sass鏈接,進入url:https://github.com/sass/node-sass/releases

2、?下載指定版本:在頁面中找到報錯中你需要的版本,下載到本地

3、在.../node_modules/node-sass/vendor目錄下新建目錄?darwin-x64-72,將下載的文件放在此目錄下,并更名為binding.node。(按照個人需求將下載的文件發在指定目錄下)

4、重新運行代碼,大功告成!

總結

以上是生活随笔為你收集整理的Missing binding node_modules/node-sass/vendor/darwin-x64-72/binding.node的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。