本人在安裝vue腳手架時(shí)報(bào)這樣的錯(cuò),我訪問(wèn)了漫山遍野還是沒(méi)找到答案,有人叫我用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ā)紅包,終于找到解決方案了,貌似是網(wǎng)絡(luò)代理問(wèn)題。
換一個(gè)npm安裝源就好了,具體方法如下:
1.通過(guò)config命令
npm config set registry https://registry.npm.taobao.org
npm info underscore (如果上面配置正確這個(gè)命令會(huì)有字符串response)
2.命令行指定
npm --registry https://registry.npm.taobao.org info underscore
然后再安裝就好了
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com