簡體   English   中英

無法在我的新ASP.NET應用程序中安裝Bower軟件包

[英]Cannot install bower packages in my new ASP.NET application

我剛剛創建了我的第一個asp.net 6項目。

但是,每當我嘗試安裝Bower軟件包時,都會出現以下錯誤(發生在我嘗試安裝的所有軟件包中):

PATH =。\\ node_modules.bin; C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ Common7 \\ IDE \\ Extensions \\ Microsoft \\ Web Tools \\ External;%PATH%; C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ Common7 \\ IDE \\ Extensions \\ Microsoft \\ Web Tools \\ External \\ git“ C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ Common7 \\ IDE \\ Extensions \\ Microsoft \\ Web Tools \\ External \\ Bower.cmd”安裝Jcrop#2.0.2-生產--force-latest-保存Bower Jcrop#2.0.2未緩存https://github.com/tapmodo/Jcrop.git#2.0.2 bower Jcrop#2.0.2
解析https://github.com/tapmodo/Jcrop.git#2.0.2 bower Jcrop#2.0.2
checkout v2.0.2 bower Jcrop#2.0.2 ECMDERR無法執行“ git clone https://github.com/tapmodo/Jcrop.git -b v2.0.2 --progress。--depth 1”,退出代碼為#- 532462766

我看過線程: VS 2015 + Bower:在防火牆后面無法正常工作

我試圖禁用防火牆,並在用戶目錄中創建一個.gifconfig文件,其中包括:

[url "https://github.com/"]
    insteadOf = git@github.com:
[url "https://"]
    insteadOf = git://

但是似乎沒有任何效果-我仍然會收到錯誤消息!

(除了Visual Studio 2015附帶的東西之外,我沒有安裝git)

簡而言之,對我有用的是從git-scm安裝git並使Visual Studio與其一起工作,而不是預先安裝的東西。

  • https://git-scm.com/downloads/win下載並安裝git
    • 請注意,我需要在安裝前退出VS
  • 配置VS以使用新版本的git
    • 在VS Solution Explorer中,右鍵單擊依賴項下的Bower文件夾,然后單擊“配置外部工具...”。
    • 取消選中現有的$(DevEnvDir)... \\ git工具
    • 將新路徑添加到\\ Program Files \\ Git \\ bin
    • 點擊確定

祝好運....

我遇到了同樣的問題,但是我可以通過提供的鏈接來解決它,但是您缺少關鍵步驟:您需要自己安裝Git並配置VS來使用它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM