日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > vue >内容正文

vue

VSCode 启动 Vue 项目 npm install 报错

發布時間:2025/3/14 vue 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 VSCode 启动 Vue 项目 npm install 报错 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.? 報錯后,查看了版本。

? ? ? ?查看node版本:node -v

? ? ? ?查看npm版本:npm -v

? ? ? ?查看Augular版本:ng --version

2.? 感覺 Augular CLI版本太低,使用以下方法升級到最新版本:

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?》 npm uninstall -g @angular/cli?

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?》 npm cache verify (或 npm cache clean --force)?

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?》 npm install -g @angular/cli@latest

? ? ? ?ng --version 后,已經升級完成。

3.? yarn install 之后,發現是 node-sass 安裝失敗的問題。

4.? 解決方案: 》 npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

? ? ? ? ? ? ? ? ? ? ? ? 》?npm audit fix (若無high,可無需執行此命令)

5.? 最后,執行命令 npm start ,vue項目成功啟動。

?

以下摘自別人總結的node-sass安裝失敗原因:

npm 安裝 node-sass 依賴時,會從 github.com 上下載 .node 文件。由于國內網絡環境的問題,這個下載時間可能會很長,甚至導致超時失敗。

解決方案就是使用其他源,或者使用工具下載,然后將安裝源指定到本地。

?

參考:https://segmentfault.com/a/1190000010984731

轉載于:https://www.cnblogs.com/ZCrystal/p/10490781.html

總結

以上是生活随笔為你收集整理的VSCode 启动 Vue 项目 npm install 报错的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。