Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
germangc125 opened this issue Oct 3, 2017 · 11 comments

Comments

@germangc125
Copy link

germangc125 commented Oct 3, 2017

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
Copy link

htsnet commented Oct 24, 2017

+1

@ebrugungor
Copy link

+1
Still no fix for this issue?

@htsnet
Copy link

htsnet commented Nov 6, 2017

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
Copy link
Author

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
Copy link

htsnet commented Nov 7, 2017

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

@germangc125
Copy link
Author

germangc125 commented Nov 7, 2017

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
Copy link

htsnet commented Nov 8, 2017

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
Copy link

@htsnet
Copy link

htsnet commented Nov 28, 2017

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
Copy link

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
Copy link

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants