wnyc / cordova-plugin-wakeuptimer

Cordova plugin for a wakeup alarm clock
90 stars 111 forks source link

cordova plugin add cordova-plugin-wakeuptimer not install error via registry. #30

Open germangc125 opened 6 years ago

germangc125 commented 6 years ago

Hi,I need your help

i have version cordova: 7.0.1 Ionic v 1 when trying to install the plugin not install:

-> cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git

Error: Failed to fetch plugin https://github.com/wnyc/cordova-plugin-wakeuptimer.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 4294963228 Error output: npm ERR! addLocal Could not install C:\Users\germa\AppData\Local\Temp\npm-6268-f4f54423\git-cache-eb611dc2\ae06fc686e7111f593d1e7489034ba77736fd5f2 npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/wnyc/cordova-plugin-wakeuptimer.git" "--save" npm ERR! node v6.9.2 npm ERR! npm v3.10.9 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:\~~\node_modules\npm-debug.log

htsnet commented 6 years ago

+1

ebrugungor commented 6 years ago

+1 Still no fix for this issue?

htsnet commented 6 years ago

I found another link: https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git. With this, I could install normally. But... it does not work. When I try to set an alarm, I receive two messages error: WakeupPlugin erros: invalid json Invalid action

germangc125 commented 6 years ago

This plugin https://github.com/jkhax0r/cordova-plugin-wakeuptimer.gitIt It is not the same as wnyc? use the same command to install cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git

htsnet commented 6 years ago

Almost the same. The first was updated 8 months ago.

germangc125 commented 6 years ago

But if I install - cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git, I would not be installing the el jkhax0r?, or how do I install this https://github.com/jkhax0r/cordova-plugin-wakeuptimer.gitIt? Thanks!

htsnet commented 6 years ago

Only the second one (https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git). It is almost the same, but newer. I could install with no issues. The question is that it isn´t working yet. I receive 2 messages when trying to activate one alarm: WakeupPlugin error: invalid json; Invalid action.

eckerlycl commented 6 years ago

cordova add https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git adds this repository: https://github.com/wnyc/cordova-plugin-wakeuptimer.git

htsnet commented 6 years ago

Maybe. But I downloaded the zip file and installed locally. BUt, it doesn´t work to me yet. I receive a message "JSON Invalid". And I don´t know why.

kirillemko commented 5 years ago

Hi everyone. Sorry for necro. I made it worked I installed plugin by cordova add https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git

as htsnet said, there was json invalid error when i tried to use it. I edited java files a little to see error description. So i found what was wrong

skipOnAwake, skipOnRunning and startInBackground are the required fields in alarm option object! so i made it work with this code:

window.wakeuptimer.wakeup( function (a) { console.log(a,"time success"); }, function (a) { console.log(a,'timer set error'); }, // a list of alarms to set { alarms : [{ type : 'onetime', skipOnAwake: false, // set timer, but skip launch if user is using the phone (screen is on) skipOnRunning: false, // set wakeup timer, but skip launch if app is already running startInBackground: false, time : { hour : 22, minute : 26 }, extra : { message : 'json containing app-specific information to be posted when alarm triggers' }, message : 'Alarm has expired!' }] } );

Hope it will be helpfull for someone

Pratz007-tech commented 4 years ago

Hi,I need your help

i have version cordova: 7.0.1 Ionic v 1 when trying to install the plugin not install:

-> cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git

Error: Failed to fetch plugin https://github.com/wnyc/cordova-plugin-wakeuptimer.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 4294963228 Error output: npm ERR! addLocal Could not install C:\Users\germa\AppData\Local\Temp\npm-6268-f4f54423\git-cache-eb611dc2\ae06fc686e7111f593d1e7489034ba77736fd5f2 npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/wnyc/cordova-plugin-wakeuptimer.git" "--save" npm ERR! node v6.9.2 npm ERR! npm v3.10.9 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:~~\node_modules\npm-debug.log

How did you tackle this issue ? Were you able to resolve it by above help i.e installation of alternate plugin ?