tolu360/cordova-plugin-paystack

Paystack not building for android platform

Closed this issue · 10 comments

I am trying to implement paystack to an android app, But there seems to be an issue with the plugin, Everytime I build the plugin make the build to fail for android

Installing "cordova-plugin-paystack" for android
Failed to install 'cordova-plugin-paystack': Error
at C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\fetch.js:205:33
at rejected (C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:864:24)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:890:30
at Promise.when (C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:808:41)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:624:44
at runSingle (C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:137:13)
at flush (C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-fetch\node_modules\q\q.js:125:13)
at combinedTickCallback (internal/process/next_tick.js:73:7)
at process.tickCallback (internal/process/next_tick.js:104:9)
Error: Failed to fetch plugin https://github.com/dpa99c/cordova-custom-config.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: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit at Socket. (internal/child_process.js:342:11)
npm WARN addRemoteGit at emitOne (events.js:96:13)
npm WARN addRemoteGit at Socket.emit (events.js:191:7)
npm WARN addRemoteGit at Pipe.handle.close [as onclose] (net.js:509:12)
npm WARN addRemoteGit git+https://github.com/dpa99c/cordova-custom-config.git resetting remote C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-dpa99c-cordova-custom-config-git-4785388d because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit at Socket. (internal/child_process.js:342:11)
npm WARN addRemoteGit at emitOne (events.js:96:13)
npm WARN addRemoteGit at Socket.emit (events.js:191:7)
npm WARN addRemoteGit at Pipe.handle.close [as _onclose] (net.js:509:12)
npm WARN addRemoteGit killed: false,
npm WARN addRemoteGit code: 1,
npm WARN addRemoteGit signal: null,
npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-dpa99c-cordova-custom-config-git-4785388d C:\Users\Admin\AppData\Local\Temp\npm-9688-a6fff09d\git-cache-a438f990\b4d017dc5ff057dcb828e9e4ea8e1dcd9dfd261b: Cloning into 'C:\Users\Admin\AppData\Local\Temp\npm-9688-a6fff09d\git-cache-a438f990\b4d017dc5ff057dcb828e9e4ea8e1dcd9dfd261b'...
npm ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-dpa99c-cordova-custom-config-git-4785388d C:\Users\Admin\AppData\Local\Temp\npm-9688-a6fff09d\git-cache-a438f990\b4d017dc5ff057dcb828e9e4ea8e1dcd9dfd261b: error: cannot spawn sh: No such file or directory
npm ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-dpa99c-cordova-custom-config-git-4785388d C:\Users\Admin\AppData\Local\Temp\npm-9688-a6fff09d\git-cache-a438f990\b4d017dc5ff057dcb828e9e4ea8e1dcd9dfd261b: fatal: unable to fork
npm ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-dpa99c-cordova-custom-config-git-4785388d C:\Users\Admin\AppData\Local\Temp\npm-9688-a6fff09d\git-cache-a438f990\b4d017dc5ff057dcb828e9e4ea8e1dcd9dfd261b:
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/dpa99c/cordova-custom-config.git" "--save"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-dpa99c-cordova-custom-config-git-4785388d C:\Users\Admin\AppData\Local\Temp\npm-9688-a6fff09d\git-cache-a438f990\b4d017dc5ff057dcb828e9e4ea8e1dcd9dfd261b
npm ERR! Cloning into 'C:\Users\Admin\AppData\Local\Temp\npm-9688-a6fff09d\git-cache-a438f990\b4d017dc5ff057dcb828e9e4ea8e1dcd9dfd261b'...
npm ERR! error: cannot spawn sh: No such file or directory
npm ERR! fatal: unable to fork
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-04-09T08_26_48_942Z-debug.log
[ERROR] Exception:

Please out..

What is your Cordova CLI version? Run cordova -v on your terminal to check

My version is : 7.0.1

I'd recommend making sure node_modules/cordova-custom-config and plugins/cordova-custom-config are not already present - if they are, delete them.

Then try a fresh install of the plugin using:

cordova plugin add cordova-custom-config --fetch --save

Then to build your project again.

How do i delete them ?

Should i use CLI ?
or just delete ?

Anyway you are most comfortable with.

Now i get this error when i ran this : ionic cordova plugin add cordova-custom-config --fetch --save

cordova plugin add cordova-custom-config --save
Error: Failed to fetch plugin cordova-custom-config 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 ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-9a0b67c9 C:\Users\Admin\AppData\Local\Temp\npm-13684-8c33d5a0\git-cache-9d5a9a3c\5ccd600b0b7fd3ae204edc9e69c1c30406d07747: Cloning into 'C:\Users\Admin\AppData\Local\Temp\npm-13684-8c33d5a0\git-cache-9d5a9a3c\5ccd600b0b7fd3ae204edc9e69c1c30406d07747'...
npm ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-9a0b67c9 C:\Users\Admin\AppData\Local\Temp\npm-13684-8c33d5a0\git-cache-9d5a9a3c\5ccd600b0b7fd3ae204edc9e69c1c30406d07747: error: cannot spawn sh: No such file or directory
npm ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-9a0b67c9 C:\Users\Admin\AppData\Local\Temp\npm-13684-8c33d5a0\git-cache-9d5a9a3c\5ccd600b0b7fd3ae204edc9e69c1c30406d07747: fatal: unable to fork
npm ERR! git clone C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-9a0b67c9 C:\Users\Admin\AppData\Local\Temp\npm-13684-8c33d5a0\git-cache-9d5a9a3c\5ccd600b0b7fd3ae204edc9e69c1c30406d07747:
npm ERR! git fetch -a origin (https://github.com/xiangpingmeng/plist.js.git) fatal: Unable to find remote helper for 'https'
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit xiangpingmeng/plist.js resetting remote C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-cbe72376 because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit killed: false,
npm WARN addRemoteGit code: 1,
npm WARN addRemoteGit signal: null,
npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm ERR! git clone --template=C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes_templates --mirror git@github.com:xiangpingmeng/plist.js.git C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-cbe72376: Cloning into bare repository 'C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-cbe72376'...
npm ERR! git clone --template=C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes_templates --mirror git@github.com:xiangpingmeng/plist.js.git C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-cbe72376: error: cannot spawn ssh: No such file or directory
npm ERR! git clone --template=C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes_templates --mirror git@github.com:xiangpingmeng/plist.js.git C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-cbe72376: fatal: unable to fork
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "cordova-custom-config" "--save"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes_templates --mirror git@github.com:xiangpingmeng/plist.js.git C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-cbe72376
npm ERR! Cloning into bare repository 'C:\Users\Admin\AppData\Roaming\npm-cache_git-remotes\git-github-com-xiangpingmeng-plist-js-git-cbe72376'...
npm ERR! error: cannot spawn ssh: No such file or directory
npm ERR! fatal: unable to fork
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-04-11T13_06_36_878Z-debug.log

[ERROR] An error occurred while running cordova plugin add cordova-custom-config --save (exit code
1).

Pleae can you help out ?

node_modules/cordova-custom-config and plugins/cordova-custom-config are not already present

I try to still build same error i get.

@Francis-nova I use phonegap build (it doesnt support the custom config plugin), so i had to fork my version of this plugin, works on cordova 7.0.1 just add this plugin

cordova plugin add https://github.com/Creativekodes/cordova-plugin-paystack.git --variable PUBLIC_KEY=Your-Public-key

or in your config.xml add

<plugin spec="https://github.com/Creativekodes/cordova-plugin-paystack.git" source="git">
       <variable name="PUBLIC_KEY" value="Your-Public-key" />
</plugin>
cids commented

Hi, closing this as a stale issue, if you still have this issue on the latest version (3.2.0) and following the updated README, kindly re-open. Cheers!