What a disappointment! Ionic has become the Java of mobile development


#4

Dear friend, you do not have to bluntly respond to legitimate frustration.

I developed with Ionic 2 years ago and before these new versions had never had problems like this.

So calm down.

Well, I am addressing this problem:

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

> cordova plugin add de.appplant.cordova.plugin.local-notification --save
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.
        
[ERROR] 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 /home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:205:33
        at _rejected
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:864:24)
        at /home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:890:30
        at Promise.when
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:1142:31)
        at Promise.promise.promiseDispatch
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:808:41)
        at /home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:624:44
        at runSingle
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:137:13)
        at flush
        (/home/walter/.npm-global/lib/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 cordova-plugin-app-event via registry.
        Probably this is either a connection problem, or plugin spec is incorrect.
        Check your connection and plugin name/version/URL.
        Failed to get absolute path to installed module

#5

My friend, I’m really not dealing with routing or with deep links, and moreover, errors occur when I execute the command to add plugins via ionic cordova plugin add and when adding ionicNative packages that accompany these plugins via NPM with npm install - -save @ionic-native/some-plugin

The errors are not running the app or debugging.


#6

I think you have a problem with your network environment, because I just ran the ionic cordova plugin add de.appplant.cordova.plugin.local-notification command and it worked fine.


#7

Thank you for your prompt response. really.

Well, then my network connection just does not like this plugin, because other things I can install normally.

I even use a lot of resources coming from github, and I even tried to install this plugin from its official github repository, and none of that solved it.

$ ionic cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications


#8

For me, the main problem is in this line of error when trying to install the plugin:

ELOOP: too many symbolic links encountered, access

This excess of symbolic links.

Many answers on the internet talk about this problem but without giving a solution that is not regressed for Node.js 6.x and NPM 3.6.x


#9

See the very end of this thread, and check your lock file.


#10

Unfortunately it did not work for me.


#11

You could try switching to the latest LTS version of Node. I generally find that more reliable than using bleeding edge versions of npm. More ideas in here. If you’re not already using it, I highly recommend nvm for managing node/npm installations. Allows easy installation of multiple versions, switching and cleanup.


#12

Unfortunately I can not use Lode Node.js as this is version 6.x. With it I can not even run the Ionic command, because the node-sass required by Ionic only runs above version 7 of the Node.s

I made another attempt.

I have the latest versions of Cordova, NPM and Ionic CLI installed.

I’ve created a new blank ionic app:

$ Ionic start local-notification blank --cordova

I added the android platforms and ios:

$ Ionic cordova platform add ios android

And finally I added the plugin:

$ Ionic cordova plugin add de.appplant.cordova.plugin.local-notification

And I received the same error:

> cordova plugin add de.appplant.cordova.plugin.local-notification --save
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.
        
[ERROR] 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 /home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:205:33
        at _rejected
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:864:24)
        at /home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:890:30
        at Promise.when
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:1142:31)
        at Promise.promise.promiseDispatch
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:808:41)
        at /home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:624:44
        at runSingle
        (/home/walter/.npm-global/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:137:13)
        at flush
        (/home/walter/.npm-global/lib/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 cordova-plugin-app-event via registry.
        Probably this is either a connection problem, or plugin spec is incorrect.
        Check your connection and plugin name/version/URL.
        Failed to get absolute path to installed module

#13

We need to help them financially. Ionic is truly the best thing that happend to mobile dev.


#14

"You can’t use Cordova plugins that haven’t made the necessary changes for Cordova 7.

Go without the plugins you’re trying to install or go back to Cordova 6."

It finally Works for me. But a need to recriate ALL the app bicose this has have been created with latest cordova.

=\


#15

Good advice @rapropos.
I can confirm that, while I don’t have these specific problems, LTS Node has been a requirement for me across the board.


#16

That’s news to me.

$ ionic info
cli packages:

    @ionic/cli-utils  : 1.6.0 (project/node_modules/ionic/node_modules/@ionic/cli-utils)
    ionic (Ionic CLI) : 3.6.0 (project/node_modules/ionic)

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts              : 2.0.2
    @ionic/cli-plugin-cordova       : 1.4.1
    @ionic/cli-plugin-ionic-angular : 1.3.2
    Cordova Platforms               : android 6.2.3
    Ionic Framework                 : ionic-angular 3.6.0

System:

    Android SDK Tools : 26.0.2
    Node              : v6.11.1
    OS                : Linux 4.9
    npm               : 3.10.10 

#17

At first I also found it strange. So I downgraded to version 6 of my global installation of Cordova, I created a new ionic app with $ ionic start, I added the platforms, and finally I tried to install the plugin, and yes, it worked!


#18

But before accepting the downgrade of the cordova as absolute truth, I will try to replicate your environment here to be sure.

The only problem is the erratic mansion that I get when using the $ ionic serve informing of the incompatibility of the node-sass with the version of node.js lower than 7.x


#19

Something occurred to me here now …
Would it be possible to create environments with node.js, cordova and ionic-cli in Docker to test various environment options?


#20

Just to jump in:

All the issues described have nothing to do with Ionic Framework itself, but the greater ecosystem of Cordova, NPM and Javascript in general - and Java! Because of course Cordova is using Java to create Android projects.

What you are experiencing specifically are problems with Cordova 7 (that is slowly switching over to NPM instead of their home grown dependency management and distribution system) and probably also with NPM itself, that recently made a major version upgrade that changed some things.


#21

Very possible, but the combinations are endless.

If it is just for you, you can get the same result by using nvm or nvm-windows to install multiple node versions (which then can have their own NPM, Cordova and Ionic CLI).


#22

That’s exactly what I realized. When I downgraded to Cordova 6.0.0 everything worked again.
But I think I was very radical al to download to version 6.0.0, what would be the stable version of the 6.x that I could use?


#23

I thought of Docker because I had problems using nvm in my Ubuntu = /