Ionic – Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again.

一開始學習Ionic Framework便碰丁
當我嘗試跟著教學 建立我第一個Ionic Project的時候..
出現了以下的錯誤信息

Unable to add plugins. Perhaps your version of Cordova is too old. Try updating
(npm install -g cordova), removing this project folder, and trying again.
Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again

我嘗試使用他的建議去更新電腦上的 cordova
Update Cordova - npm install -g cordova

之後再次建立新的Ionic Project
可惜結果都是一樣..
之後我便你細地看看這些錯誤信息..

詳細資料:

Error: Command failed: fatal: could not create work tree dir ‘C:\Users\Chi\AppDa
ta\Local\Temp\plugman\git\1407081827937′.: No such file or directory

at ChildProcess.exithandler (child_process.js:648:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Socket. (child_process.js:969:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
Unable to add plugins. Perhaps your version of Cordova is too old. Try updating
(npm install -g cordova), removing this project folder, and trying again.

其中有一句是說 “AppData\Local\Temp\plugman\git\No such File or directory / 沒有這個資料夾
所以我便開啟電腦上這個資料夾查看…
發現”plugman“這個資料夾真是不存在..
AppData/Local/Temp

所以我便嘗試新增需要的暫存資料夾 “plugman
在”plugman“入再新增”git“資料夾
plugman folder on AppData\Local\Temp

之後再次執行 ionic來建立新的Application

結果..
成功了

Successfully create Ionic Framework Application

Hope you find it useful

Leave a Reply