Closed kodeine closed 6 years ago
It appears this is due to a change in the format of fetch.json
when using cordova@7
.
By default, cordova@7
uses npm install
to install plugins whereas cordova@6
and earlier used git clone
.
Therefore, when adding a plugin from a git repo, the entry in fetch.json
is different between the cordova versions.
For example:
cordova plugin add https://github.com/apache/cordova-plugin-geolocation
Entry in fetch.json
using cordova@6.5.0
:
"cordova-plugin-geolocation": {
"source": {
"type": "git",
"url": "https://github.com/apache/cordova-plugin-geolocation",
"subdir": "."
},
"is_top_level": true,
"variables": {}
}
Entry in fetch.json
using cordova@7.0.1
:
"cordova-plugin-geolocation": {
"source": {
"type": "registry",
"id": "https://github.com/apache/cordova-plugin-geolocation"
},
"is_top_level": true,
"variables": {}
}
As you can see, cordova@7
now sets type: registry
even though it was installed from a Git repo.
This tool currently expects type: git
hence the error.
I'll have to do some regex checking on the source.id
to determine the source type, rather than relying on source.type
.
Will publish a patch release to fix this soon.
Fixed in cordova-check-plugins@3.1.0
which now fully supports cordova@7
.
this is how package.json looks like
plugins/fetch.json