記一次升級node版本後,運行原vue項目報錯問題解決方法

    今天由於想要嘗試一下vue-cli3版本的腳手架,因而更新了一下node版本,結果致使原來的vue項目沒法成功啓動,報錯信息大概相似於vue

   「Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x」node

    同時,命令行提示:vue-cli

    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.npm

    看這個說明,大概意思就是說,由於我在執行了npm install指令安裝好了依賴以後,環境又發生了改變(node版本變動),因此不能將當前的node環境與項目中的sass依賴創建綁定關係,須要執行「npm rebuild node-sass」來從新下載依賴。sass

    因此,按他說的,執行命令npm rebuild node-sassapp

    一通下載以後,運行項目,依然報錯,因而開始百度,按照其餘網友的指示,再執行一次npm update 來更新項目裏的依賴包,而後,大功告成。ui

相關文章
相關標籤/搜索