Vue環(huán)境搭建報(bào)錯(cuò)整理大全
錯(cuò)1: 執(zhí)行 cnpm install / npm install 報(bào)錯(cuò)如下
× Install fail! Error: [tui-editor@1.3.3 ? tui-chart@3.11.3 ? raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] An unknown git error occurred Error: [tui-editor@1.3.3 ? tui-chart@3.11.3 ? raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] An unknown git error occurred at module.exports (C:\Users\LMGD\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\download\git.js:36:11) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async module.exports (C:\Users\LMGD\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\download\index.js:17:12) at async _install (C:\Users\LMGD\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\install.js:125:16) at async install (C:\Users\LMGD\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\install.js:26:12) at async mapper (C:\Users\LMGD\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\install.js:266:9)
解決:
辦法1:降低node.js版本
1、開(kāi)始以為是鏡像源連接不上,換成淘寶鏡像也不行。
2、node.js卸載多次,重新安裝也不行。百度的方法都試過(guò)也不行。最后最后最后,降低node.js版本,問(wèn)題解決。
3、node.js 原本使用的版本是 node-v16.13.0-x64 卸載重新安裝 node-v12.9.0-x64 即可。(只是解決了這個(gè)問(wèn)題而已,其他問(wèn)題還是需要百度)
辦法2:降低版本依舊報(bào)錯(cuò),執(zhí)行相關(guān)命令
Error: [tui-editor@1.3.3 ? tui-chart@3.11.3 ? raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] An unknown git error occurred at module.exports (C:\Users\LMGD\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\download\git.js:36:11) at processTicksAndRejections (internal/process/task_queues.js:85:5)
解決:執(zhí)行如下命令即可
npm install cnpm -g --registry=https://registry.npm.taobao.org
效果截圖:
報(bào)錯(cuò)2:core-js 缺失問(wèn)題
npm install --save core-js/modules/es.regexp.dot-all.js core-js/modules/es.typed-array.at.js
解決:core-js 缺失問(wèn)題,首先安裝core-js ;運(yùn)行:npm install core-js@2
npm install core-js@2
報(bào)錯(cuò)3: Connection was aborted, errno 10053
OpenSSL SSL_read: Connection was aborted, errno 10053
原因: Git默認(rèn)限制推送的大小,運(yùn)行命令更改限制大小即可
解決: 執(zhí)行命令 :git config --global http.postBuffer 524288000
git config --global http.postBuffer 524288000
報(bào)錯(cuò)4:npm ERR! git@github.com: Permission denied (publickey)
npm WARN using --force Recommended protections disabled. npm ERR! npm ERR! code 128 npm ERR! npm ERR! An unknown git error occurred npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/adobe-webplatform/eve.git npm ERR! npm ERR! git@github.com: Permission denied (publickey). npm ERR! npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! npm ERR! and the repository exists.
解決:本地重新生成 publickey,然后在github上配置key即可
錯(cuò)誤5:Error: Cannot find module 'webpack' 問(wèn)題解決辦法
解決:沒(méi)找到webpack模塊,安裝webpack模塊,執(zhí)行命令 npm install --save-dev webpack
npm install --save-dev webpack
錯(cuò)誤6: wanda-admin@4.4.0 dev: `vue-cli-service serve`
解決:使用淘寶鏡像,執(zhí)行如下命令即可
npm install cnpm -g --registry=https://registry.npm.taobao.org
錯(cuò)誤7:Error: Cannot find module '@vue/cli-plugin-babel'
Error: Cannot find module '@vue/cli-plugin-babel' Require stack: - C:\Users\LMGD\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js - C:\Users\LMGD\AppData\Roaming\npm\node_modules\@vue\cli-service\bin\vue-cli-service.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15) at Function.Module._load (internal/modules/cjs/loader.js:677:27) at Module.require (internal/modules/cjs/loader.js:830:19) at require (internal/modules/cjs/helpers.js:68:18) at idToPlugin (C:\Users\LMGD\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js:145:14) at C:\Users\LMGD\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js:184:20 at Array.map (<anonymous>) at Service.resolvePlugins (C:\Users\LMGD\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js:170:10) at new Service (C:\Users\LMGD\AppData\Roaming\npm\node_modules\@vue\cli-service\lib\Service.js:32:25) at Object.<anonymous> (C:\Users\LMGD\AppData\Roaming\npm\node_modules\@vue\cli-service\bin\vue-cli-service.js:15:17) {
解決:缺少 @vue/cli-plugin-babel 安裝即可。執(zhí)行命令:npm install @vue/cli-plugin-babel
npm install @vue/cli-plugin-babel
錯(cuò)誤8:vue-cli · Failed to download repo vuejs-templates/webpack: read ECONNRESET
輸入初始化項(xiàng)目命令 vue init webpack xxx項(xiàng)目名; 后報(bào)錯(cuò) 報(bào)錯(cuò)信息: vue-cli · Failed to download repo vuejs-templates/webpack: read ECONNRESET
解決: 這是網(wǎng)絡(luò)問(wèn)題,切換好一點(diǎn)的網(wǎng)絡(luò)即可解決;
切換網(wǎng)絡(luò)后的效果圖:
總結(jié)
到此這篇關(guān)于Vue環(huán)境搭建報(bào)錯(cuò)整理的文章就介紹到這了,更多相關(guān)Vue環(huán)境搭建報(bào)錯(cuò)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
詳解vue-meta如何讓你更優(yōu)雅的管理頭部標(biāo)簽
這篇文章主要介紹了詳解vue-meta如何讓你更優(yōu)雅的管理頭部標(biāo)簽,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2018-01-01vue 組件數(shù)據(jù)加載解析順序的詳細(xì)代碼
Vue.js的解析順序可以概括為:模板編譯、組件創(chuàng)建、數(shù)據(jù)渲染、事件處理和生命周期鉤子函數(shù)執(zhí)行,接下來(lái)通過(guò)本文給大家介紹vue 組件數(shù)據(jù)加載解析順序的完整代碼,感興趣的朋友跟隨小編一起看看吧2024-03-03Vue實(shí)現(xiàn)PC端分辨率自適應(yīng)的示例代碼
本文主要介紹了Vue實(shí)現(xiàn)PC端分辨率自適應(yīng)的示例代碼,文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-08-08Vue異步更新DOM及$nextTick執(zhí)行機(jī)制解讀
這篇文章主要介紹了Vue異步更新DOM及$nextTick執(zhí)行機(jī)制解讀,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-03-03vue2使用keep-alive緩存多層列表頁(yè)的方法
今天小編就為大家分享一篇vue2使用keep-alive緩存多層列表頁(yè)的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-09-09vue2導(dǎo)入使用vue-codemirror組件的教程詳解
vue-codemirror是一個(gè)基于Vue的代碼在線編輯器組件,它封裝了CodeMirror編輯器,使得在Vue項(xiàng)目中可以方便地使用CodeMirror,下面我們就來(lái)看看vue-codemirror的具體使用吧2024-02-02vue3輸入單號(hào)和張數(shù)如何自動(dòng)生成連號(hào)的單號(hào)
最近遇到這樣的需求輸入連號(hào)事件,需要在表格中輸入物流單號(hào),物流號(hào)碼,生成的數(shù)量,名稱(chēng),點(diǎn)擊確定自動(dòng)生成固定數(shù)量的連號(hào)物流單號(hào),本文重點(diǎn)介紹vue3輸入單號(hào)和張數(shù),自動(dòng)生成連號(hào)的單號(hào),感興趣的朋友一起看看吧2024-02-02