katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin
Apache License 2.0
2.57k stars 1.75k forks source link

Can't install plugin on my project #1474

Closed pimatco closed 6 years ago

pimatco commented 6 years ago

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.

Your Environment

Expected Behavior

Tried installing the dependecy from the instructions of ionic native website but this is what I get:

ionic cordova plugin add cordova-plugin-local-notification

Error: cmd: Command failed with exit code 1 Error output:
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "D:\...\ml_p0\\node_modules\\npm\\bin\\npm-cli.js" "install" "cordova-plugin-local-notification" "--production" "--save"
npm ERR! node v6.11.3
npm ERR! npm  v2.15.12
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package @angular/common@5.0.3 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/cdk@5.0.1 wants @angular/common@~5.1.0
npm ERR! peerinvalid Peer @angular/forms@5.0.3 wants @angular/common@5.0.3
npm ERR! peerinvalid Peer @angular/material@5.0.1 wants @angular/common@~5.1.0
npm ERR! peerinvalid Peer @angular/platform-browser@5.0.3 wants @angular/common@5.0.3
npm ERR! peerinvalid Peer @angular/platform-browser-dynamic@5.0.3 wants @angular/common@5.0.3

npm ERR! Please include the following file with any support request:
npm ERR!     D:\...\npm-debug.log

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

I added the version 0.8.4 to package.json and when i run npm install this is what i get

npm ERR! code ETARGET npm ERR! notarget No matching version found for cordova-plugin-local-notifications@^0.8.4 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of 'ml_p0' npm ERR! notarget

Tell us what should happen

It should install and work on my phone

Actual Behavior

can't install

Tell us what happens instead

I have that error when installing a stable version . 0.8.4

Steps to Reproduce

Reproduce this issue; include code to reproduce, if relevant

  1. ...
  2. ...
  3. ...
  4. ....

Context

What were you trying to do?

Trying to use local notifications in Android

Debug logs

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install' ]
2 info using npm@5.5.1
3 info using node@v6.11.3
4 verbose npm-session 80bd514e8edd8e18
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall ml_p0@0.0.1
7 info lifecycle ml_p0@0.0.1~preinstall: ml_p0@0.0.1
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 silly install loadAllDepsIntoIdealTree
14 http fetch GET 200 https://registry.npmjs.org/cordova-plugin-local-notifications 307ms
15 silly registry:manifest no matching version for cordova-plugin-local-notifications@^0.8.4 in the cache. Forcing revalidation
16 http fetch GET 304 https://registry.npmjs.org/cordova-plugin-local-notifications 60ms (from cache)
17 silly fetchPackageMetaData error for cordova-plugin-local-notifications@^0.8.4 No matching version found for cordova-plugin-local-notifications@^0.8.4
18 silly registry:manifest no matching version for cordova-plugin-local-notifications@^0.8.4 in the cache. Forcing revalidation
19 http fetch GET 304 https://registry.npmjs.org/cordova-plugin-local-notifications 58ms (from cache)
20 silly fetchPackageMetaData error for cordova-plugin-local-notifications@^0.8.4 No matching version found for cordova-plugin-local-notifications@^0.8.4
21 verbose type range
22 verbose stack cordova-plugin-local-notifications: No matching version found for cordova-plugin-local-notifications@^0.8.4
22 verbose stack     at pickManifest (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\npm-pick-manifest\index.js:61:11)
22 verbose stack     at fetchPackument.then.packument (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\manifest.js:51:18)
22 verbose stack     at tryCatcher (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
22 verbose stack     at Promise._settlePromiseFromHandler (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
22 verbose stack     at Promise._settlePromise (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
22 verbose stack     at Promise._settlePromise0 (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
22 verbose stack     at Promise._settlePromises (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
22 verbose stack     at Async._drainQueue (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
22 verbose stack     at Async._drainQueues (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
22 verbose stack     at Immediate.Async.drainQueues (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
22 verbose stack     at runCallback (timers.js:672:20)
22 verbose stack     at tryOnImmediate (timers.js:645:5)
22 verbose stack     at processImmediate [as _immediateCallback] (timers.js:617:5)
23 verbose cwd D:\PROJETOS\ANGULAR4\ML_P0\ml_p0
24 verbose Windows_NT 10.0.16299
25 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
26 verbose node v6.11.3
27 verbose npm  v5.5.1
28 error code ETARGET
29 error notarget No matching version found for cordova-plugin-local-notifications@^0.8.4
30 error notarget In most cases you or one of your dependencies are requesting
30 error notarget a package version that doesn't exist.
30 error notarget
30 error notarget It was specified as a dependency of 'ml_p0'
31 verbose exit [ 1, true ]

Include iOS / Android logs

12-20 12:49:22.061 10482-10482/io.ionic.starter I/chromium: [INFO:CONSOLE(904)] "NaN", source: file:///android_asset/www/build/main.js (904)
12-20 12:49:22.061 10482-10482/io.ionic.starter I/chromium: [INFO:CONSOLE(61381)] "Native: tried calling LocalNotifications.schedule, but the LocalNotifications plugin is not installed.", source: file:///android_asset/www/build/vendor.js (61381)
12-20 12:49:22.062 10482-10482/io.ionic.starter I/chromium: [INFO:CONSOLE(61387)] "Install the LocalNotifications plugin: 'ionic cordova plugin add cordova-plugin-local-notification'", source: file:///android_asset/www/build/vendor.js (61387)
himinat commented 6 years ago

according to wiki installation area, you need to use this command to install plugin ionic cordova plugin add de.appplant.cordova.plugin.local-notification@0.8.5