Error: text data outside the root of the node - when installing the cordova plugin

I sometimes get an error when trying to install any cordova ionic plugin (usually after 6pm GMT + 0).

These are plugins from npm and GitHub, and I get a message:

Error: Text data outside of root node. Line: 155 Column: 1 Char: " 

The installation command will be something like lines

ionic cordova plugin add cordova-plugin-network-information@1.3.1

It doesnโ€™t really matter which plug-in it is, because, as already mentioned, this happens for some of them, they all get the same error. In the morning, everything will work fine, and then suddenly turn off.

I tried on several computers, on several separate Internet connections (from the UK), and I even have a script that restarts the commands if they fail, so it will try to install about 20 plugins continuously until they get installed, like no matter how long I run my script. I ran it for an hour constantly, and not one of them was installed.

I also checked the status of npm and GitHub if they were possibly down, but they seemed to work as usual ...

Any ideas would be highly appreciated

+5
source share
1 answer

* Based on my comment, which helped Asser, and whom I was asked to publish as an answer: *

I donโ€™t know ionic at all, but I have some experience working with Cordova and have never had problems installing plugins even on a corporate network.

Try installing the plugin without ionic.

 cordova plugin add my.plugin.name 
+2
source

Source: https://habr.com/ru/post/1271701/


All Articles