解決Homestead yarn , npm run dev, 命令報錯問題!

解決Homestead yarn , npm run dev, 命令報錯問題!

 版權聲明:本文爲博主原創,未經博主贊成,不得轉載! https://blog.csdn.net/qq_39188306/article/details/80535663

    在寫本文以前,我由於這個報錯差點懷疑人生了,處處問處處查,最後總算是解決了,下面就直接開門見山了:html

當你執行yarn install你就會發現報如下錯誤node

解決辦法:sql

一、首先手動刪除項目中node_modules文件夾的全部內容   或   執行 $ rm -rf node_modulesnpm

二、其次執行 $ yarn config set registry http://registry.cnpmjs.orgjson

三、再次執行 $ yarn install --no-bin-linksswift

四、接下來打開根目錄下的 pakage.json 文件, 去掉4處 cross-envpost

最後執行 $ npm run watch-poll 或者 npm run dev,這樣就完成了!spa

若是仍是安裝失敗:.net

則執行 $ yarn config set registry https://registry.npm.taobao.org再執行 $ yarn install

若是仍然安裝失敗:代理

    1:關閉代理 
        $ npm config set proxy null
    2:安裝淘寶鏡像

        $ npm config set registry https://registry.npm.taobao.org

        $ npm info underscore

    3:$ yarn install 安裝node-modules

相關文章
相關標籤/搜索