安裝vue-cli報錯 -4058 的解決方法
更新時間:2017年10月19日 10:27:29 作者:滿損謙益
這篇文章主要介紹了安裝vue-cli報錯 -4058 的解決方法,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
本人在安裝vue腳手架時報這樣的錯,我訪問了漫山遍野還是沒找到答案,有人叫我用cnpm安裝,但是cnpm安裝的vue有好多坑在里面:
npm WARN checkPermissions Missing write access to C:\Users\liuyg\AppData\Roaming\npm\node_modules\vue-cli\node_modules\cliui\node_modules\wordwrap npm ERR! path C:\Users\liuyg\AppData\Roaming\npm\node_modules\vue-cli\node_modules\cliui\node_modules\wordwrap npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall access npm ERR! enoent ENOENT: no such file or directory, access 'C:\Users\liuyg\AppData\Roaming\npm\node_modules\vue-cli\node_modules\cliui\node_modules\wordwrap' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\liuyg\AppData\Roaming\npm-cache\_logs\2017-10-18T14_34_23_721Z-debug.log
于是我在繼續(xù)翻貼發(fā)紅包,終于找到解決方案了,貌似是網絡代理問題。
換一個npm安裝源就好了,具體方法如下:
1.通過config命令
npm config set registry https://registry.npm.taobao.org
npm info underscore (如果上面配置正確這個命令會有字符串response)
2.命令行指定
npm --registry https://registry.npm.taobao.org info underscore
然后再安裝就好了
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關文章
解決vue項目F5刷新mounted里的函數不執(zhí)行問題
今天小編就為大家分享一篇解決vue項目F5刷新mounted里的函數不執(zhí)行問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-11-11詳解webpack + vue + node 打造單頁面(入門篇)
本篇文章主要介紹了詳解webpack + vue + node 打造單頁面(入門篇) ,非常具有實用價值,需要的朋友可以參考下2017-09-09vue實踐---根據不同環(huán)境,自動轉換請求的url地址操作
這篇文章主要介紹了vue實踐---根據不同環(huán)境,自動轉換請求的url地址操作,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-09-09