Failed running cordova plugin add de.appplant.cordova.plugin.local-notification --save

I’m following an Ionic 2 course on Plura Sight and I’m unable to install the ionic cordova native local notification plugin as described on Ionic’s site:

$ ionic cordova plugin add de.appplant.cordova.plugin.local-notification
$ npm install --save @ionic-native/local-notifications

An error occurred while running cordova plugin add
de.appplant.cordova.plugin.local-notification --save (exit code 1):

    Installing "de.appplant.cordova.plugin.local-notification" for android
    Plugin dependency "cordova-plugin-device@1.1.4" already fetched, using
    that version.
    Dependent plugin "cordova-plugin-device" already installed on android.
    Failed to install 'de.appplant.cordova.plugin.local-notification': Error
    at
    /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:205:33

and

ELOOP: too many symbolic links encountered, open ‘/Users/laroca/Documents/elite-schedule-app/node_modules/cordova-plugin-app-event/package.json’

I haven’t been able to find a solution online.

I think I’ve seen the first error message you posted a few times in the forum here, please use the search to read through those topics.

I’ve also seen it but it doesn’t resolve my issue. The resolution I’ve seen is a plugin download from a github repo but I’ve tried that to no avail.

Hi guys,

I faced the same issue today. My node and update versions were Node: v6.11.0 & NPM: 5.0.4

I updated both Node (downloaded the stable release) and NPM (command: npm install npm@latest -g).
Now the plugin has been installed successfully using the commands.

ionic cordova plugin add de.appplant.cordova.plugin.local-notification

npm install --save

After update the versions are

Node: 6.11.1

npm: 5.3.0

I use a Windows 10 machine and I am building a ionic2 app.

Thought this might help

Cheers,
SD.

For latest IONIC 3,
So finally i solved this… follow these steps
1=>On node_modules remove de.applan… directory manually (if already available)
2=>Scroll on bottom of the node_modules directory see any not installed corova_device or de.applann… remove those…
3=> Remove the installed android platform
"ionic cordova platform remove android"
4=>Now Add the platform again
"ionic cordova platform add android"
5=>ionic cordova plugin add cordova-plugin-device
6=>ionic cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git
(!!! not use code which in ionic doc)
7=>npm install --save @ionic-native/phonegap-local-notification
8=>after the installation, enable the provider of local notification on app.module.ts…

//app.module.ts.
import { LocalNotifications } from ‘@ionic-native/local-notifications’;

providers: [

LocalNotifications,

]

9=>thats it now use the doc to schedule

hope it work*******

1 Like