hoerresb / WifiWizard

A Cordova plugin for managing Wifi networks
Apache License 2.0
205 stars 177 forks source link

When trying to fetch the plugin after saving it to config.xml, it gives 404 #108

Open yazantahhan opened 7 years ago

yazantahhan commented 7 years ago

Hi,

I have a problem in fetching the plugin after adding the plugin and saving it for the first time using ionic plugin add wifiwizard --save.

This will result to add <plugin name="com.pylonproducts.wifiwizard" spec="0.2.11" /> in config.xml .

However, if you tried to fetch the plugin using the saved entry, npm gives the following error:

Failed to restore plugin "com.pylonproducts.wifiwizard" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com.pylonproducts.wifiwizard@0.2.11 via registry.

Probably this is either a connection problem, or plugin spec is incorrect.

Check your connection and plugin name/version/URL.

Error: Registry returned 404 for GET on https://registry.npmjs.org/com.pylonproducts.wifiwizard

My assumption is a mismatch between the plugin ID and npm ID. Therefore, it should be ionic plugin add com.pylonproducts.wifiwizard when installing the plugin instead of ionic plugin add wifiwizard.

danishin commented 7 years ago

Also encountered this error today while removing platform and re-adding the platforms to reset platforms.

@yazantahhan Did you find any solution to this issue?

danishin commented 7 years ago

Seems related: #61

yazantahhan commented 7 years ago

@danishin What I did as a workaround that I changed the plugin name from com.pylonproducts.wifiwizard to wifiwizard. <plugin name="wifiwizard" spec="0.2.11" /> This will fetch the plugin correctly until they fix the naming issue.

danishin commented 7 years ago

I was using forked version of wifiwizard to merge bug fixes. And the above didn't work for me because of it (?), I think.

So I just modified package.json and published my package at https://www.npmjs.com/package/com.danishin.wifiwizard. As the main repo doesn't seem to be maintained anymore.

Anyway, thanks for the note :)

fouad3 commented 5 years ago

the problem solved for me you need to run those commands as follow: 1- run npm uninstall com.pylonproducts.wifiwizard 2- run npm uninstall wifiwizard 3- remove "com.pylonproducts.wifiwizard": {} from cordova in package.json file 4- leave the plugin as it is in the config.xml file 5- run ionic cordova plugin add wifiwizard