dpa99c / cordova-check-plugins

A CLI tool to check for / manage plugin updates in Cordova/Phonegap projects.
217 stars 25 forks source link

How to avoid error message, when checking plugins? #37

Open ThorvaldAagaard opened 5 years ago

ThorvaldAagaard commented 5 years ago

I am using a clone of a plugin https://github.com/vash15/me.apla.cordova.app-preferences.git mostly because the original author never responds.

but when checking with cordova-check-plugins I get this error message:

Error: Failed to check npm registry for plugin 'cordova-plugin-app-preferences': Error: Command failed: npm view "https://github.com/vash15/me.apla.cordova.app-preferences.git" version

and that is kind of expected as the clone is not present in the NPM-registry, but I would like to suppress that message, is that possible?

Gemeapp commented 5 years ago

I am using two plugins directly from a GitHub repo. One fails, the other one is ok when using cordova-check-plugins

This works "cordova-plugin-crop": "git+https://github.com/obeza/cordova-plugin-crop-with-ratio.git"

this fails "cordova-plugin-app-preferences": "git+https://github.com/vash15/me.apla.cordova.app-preferences.git"

but lloking at the log file I am surprised to se the following http fetch GET 404 https://registry.npmjs.org/geme.io verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/geme.io - Not found

and Geme.io is my project.

Is it because the clone I am using is updated to version 0.99.4, and the npm version is still at 0.99.3 ?

I have tried to compare both package.json and plugin.xml for the two projects to see if there is anything that needs to be changed, but I did not find any difference, that could explain why cordova-plugin-check is handling them differently

Gemeapp commented 5 years ago

Ok, now I have found the problem

The regular expression used to check if it as a git repository will not accept this repo

https://github.com/vash15/me.apla.cordova.app-preferences

due to . in the repo-name

after removing that constraint from the regular expression all is working fine