1. 程式人生 > >ionic 新增github外掛地址 報錯

ionic 新增github外掛地址 報錯

 

Error: Failed to fetch plugin https://github.com/raistlinzx/cordova-plugin-sharesdk.git 
via re          gistry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install 
C:\Users\MEDANI~1\AppData\Local\Temp\npm-114          72-66e55b5f\git-cache-
0c87610f\2da028899216518447e10db238a14f1bef40acce
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program 
Files\\nodejs\\          node_modules\\npm\\bin\\npm-cli.js" "install" 
"https://github.com/jcjee/email-co          mposer.git" "--save"
npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json 
in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Med Anis\desktop\mailtest\node_modules\npm-debug.log

原因:  cordova-plugin-sharesdk外掛中無package.json檔案 cordova-lib版本大於7.0

解決方案:刪除高版本 重新安裝一個低版本的[email protected] ,cordova安裝全域性一般安裝在C:\Users\Administrator\AppData\Roaming\npm\node_modules這個目錄,Roaming\npm-cache快取中也有的話也刪除,刪除掉再npm install [email protected] -g  然後再重新新增外掛就OK了