2015-04-12 133 views
3

我正在使用Windows 8.1筆記本電腦。我一直在找不到sudo。嘗試使用以下命令安裝npm:沒有找到Sudo。嘗試npm安裝

F:\Webruin2>sudo npm install -g git 
'sudo' is not recognized as an internal or external command, 
operable program or batch file. 

F:\Webruin2>npm install -g git 
[email protected] C:\Users\Dave\AppData\Roaming\npm\node_modules\git 
└── [email protected] 

F:\Webruin2>git -v 
'git' is not recognized as an internal or external command, 
operable program or batch file. 

F:\Webruin2>npm install -s sudo 
[email protected] node_modules\sudo 
├── [email protected] 
├── [email protected] 
└── [email protected] ([email protected]) 

F:\Webruin2>sudo npm install -g git 
'sudo' is not recognized as an internal or external command, 
operable program or batch file. 

請讓我知道最好的處理方式。如果這是脫離主題,請幫助我回到主題。 ;)

+1

Sudo是一個內置的unix/linux命令,所以我不確定你的Windows機器如何理解它。 我知道這聽起來很猥瑣,可能不是你要找的答案,但我誠實的建議是把你的Windows計算機放在..基本上其他任何東西。如果你能負擔得起,一本macbook是很好的,但如果不能,你可能會有更好的開發經驗,在VirtualBox中運行ubuntu。 –

回答

7

拉斐爾說,須藤將不會被Windows的CMD認可。鑑於npm似乎安裝在您的系統上(如成功執行「npm install -s sudo」所見),您應該可以使用命令「npm install modulename」來安裝模塊

如果您嘗試要在本地Windows平臺上安裝Git,我推薦使用以下適當的安裝程序:http://git-scm.com/download