apache / cordova-paramedic

Apache Cordova - Paramedic
https://cordova.apache.org/
Apache License 2.0
36 stars 53 forks source link

Failed to fetch plugin-test #260

Closed tibdev78 closed 1 year ago

tibdev78 commented 1 year ago

Hi everyone,

I tried using "cordova-paramedic" to test my cordova plugin but when adding my test plugin it said "Failed to fetch plugin https://github.com/apache/cordova-plugin-test-framework via registry", I look in my temporary project which was created by cordova-paramedic and indeed my test plugin is not fetchable and I don't see anything misconfigured in my code.

i followed this tuto to config my plugin and my test plugin for test: https://kerrishotts.github.io/pgday/workshops/2017/campp/testing.html

and i launch my tests like this: npx cordova-paramedic --cleanUpAfterRun --verbose --platform android --plugin .

breautek commented 1 year ago

paramedic is not a tool we release very often since since it's primary a dev tool for developing Cordova and the current NPM release is extremely dated.

I'd try cloning cordova-paramedic from git and using node main.js inside the master branch instead of npx cordova-paramedic.

Personally I have /usr/local/bin/cordova-paramedic symlinked to my main.js from a cordova-paramedic checkout.

tibdev78 commented 1 year ago

Whether you use "npx cordova-paramedic" or "node .\node_modules\cordova-paramedic\main.js" I think it's the same thing because in the package.json it uses main.js but I still have a problem with the plugin test framework.

breautek commented 1 year ago

Whether you use "npx cordova-paramedic" or "node .\node_modules\cordova-paramedic\main.js" I think it's the same thing because in the package.json it uses main.js but I still have a problem with the plugin test framework.

That's not quite accurate.

Yes it will still use main.js as that's marked as the "binary" executable but if you have installed cordova-paramedic to your project, then npx will install cordova-paramedic from NPM. The version available on NPM is a dated version that probably doesn't work with current NPM version. That's why I said to try installing from git instead.

tibdev78 commented 1 year ago

now i understand, it's work thank for you help !!