Reputation: 17
I am trying to install plugin for SQLite using following command:
cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage.git
But I get the following:
C:\Users\om\sunapp>cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage.git
(node:8180) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed
to fetch plugin https://github.com/litehelpers/Cordova-sqlite-storage.git via registry.
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 1 Error output:
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at getNotFoundError (C:\Program Files\nodejs\node_modules\npm\node_modules
\which\which.js:14:12)
npm WARN addRemoteGit at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js
:69:19)
npm WARN addRemoteGit at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js
:81:29)
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:90
:16
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_module
s\isexe\index.js:44:5
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_module
s\isexe\windows.js:29:5
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyf
ills.js:264:29
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:123:15)
npm WARN addRemoteGit git+https://github.com/litehelpers/Cordova-sqlite-storage.git resetting remot
e C:\Users\om\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-litehelpers-Cordova-sqlite
-storage-git-c710b464 because of error: { Error: not found: git
npm WARN addRemoteGit at getNotFoundError (C:\Program Files\nodejs\node_modules\npm\node_modules
\which\which.js:14:12)
npm WARN addRemoteGit at F (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js
:69:19)
npm WARN addRemoteGit at E (C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js
:81:29)
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\which.js:90
:16
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_module
s\isexe\index.js:44:5
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\which\node_module
s\isexe\windows.js:29:5
npm WARN addRemoteGit at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyf
ills.js:264:29
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOGIT' }
npm ERR! git clone --template=C:\Users\om\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror
https://github.com/litehelpers/Cordova-sqlite-storage.git C:\Users\om\AppData\Roaming\npm-cache\_gi
t-remotes\git-https-github-com-litehelpers-Cordova-sqlite-storage-git-c710b464: undefined
npm ERR! git clone --template=C:\Users\om\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror
https://github.com/litehelpers/Cordova-sqlite-storage.git C:\Users\om\AppData\Roaming\npm-cache\_gi
t-remotes\git-https-github-com-litehelpers-Cordova-sqlite-storage-git-c710b464: undefined
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\b
in\\npm-cli.js" "install" "https://github.com/litehelpers/Cordova-sqlite-storage.git" "--production"
"--save"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ENOGIT
npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\om\sunapp\npm-debug.log
I am doing it for the first time and do not understand what the issue is. How do I solve this problem?
Upvotes: 0
Views: 1211
Reputation: 1628
You don't have git install on ur system.
try
git --version
to check if the git is installed or not.
If it does not print the version then you have to install git by following command :
sudo apt-get install git-all
After git is installed you can try adding your plugin.
cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage.git
Hope this helps. cheers :)
Upvotes: 2