[英]Error installing cordova plugin for SQLite
我正在嘗試使用以下命令為SQLite安裝插件:
cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage.git
但是我得到以下信息:
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
我是第一次這樣做,不了解問題是什么。 我該如何解決這個問題?
您沒有在您的系統上安裝git。
嘗試
git --version
檢查git是否已安裝。
如果它不顯示版本,則必須通過以下命令安裝git:
sudo apt-get install git-all
安裝git后,您可以嘗試添加插件。
cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage.git
希望這可以幫助。 歡呼:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.