剛剛npm install git在 VSCode 終端中運行并運行git --version此回應:
git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
git --version
~~~
CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
安裝 Node.js 和 git install 后已經重新啟動。請幫助讓 git 在 VSCode 中作業。
uj5u.com熱心網友回復:
npm install git 不安裝 git(即操作 git 存盤庫的命令列工具)。
它安裝了名為 git的npm 包,它似乎是一個與 git 存盤庫互動的 JavaScript 庫(這使得名稱準確,但仍然具有誤導性)。
npm 不是通用包管理器。
uj5u.com熱心網友回復:
嘗試使用 -g 安裝 git global
npm install -g git
或者只是使用官方檔案https://git-scm.com/downloads安裝 git
uj5u.com熱心網友回復:
Windows、macOS 和 Linux/Unix 安裝:https : //git-scm.com/downloads并從您的下載檔案夾運行安裝程式。
在命令列中鍵入 "git --version" ,減去引號。
這是 Gits 網站上用于安裝 Git 的附加檔案:https ://git-scm.com/book/en/v2/Getting-Started-Installing-Git
要使用命令列從 npm 安裝 git,請使用此“npm i git-win”減去引號。這是從 npm 安裝 git 的 npm 檔案:https ://www.npmjs.com/package/git-win
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/340267.html
下一篇:錯誤[ERR_PACKAGE_PATH_NOT_EXPORTED]:包子路徑'./lib/tokenize'不是由node_modules中模塊的package.json中的“ex
