hoerresb / WifiWizard

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

Plugin uses two different name #129

Open dland512 opened 5 years ago

dland512 commented 5 years ago

I'm seeing weird things going on with the installation process.

I add the plugin:

$ cordova plugin add wifiwizard
Saved plugin info for "com.pylonproducts.wifiwizard" to config.xml

It works but why is it adding it as com.pylonproducts.wifiwizard rather than wifiwizard? Looking at config.xml I see it called <plugin name="com.pylonproducts.wifiwizard" spec="~0.2.11" />. Looking at package.json I see two names used for it:

"dependencies": {
    "wifiwizard": "~0.2.11",
}
...
"cordova": {
    "plugins": {
      "com.pylonproducts.wifiwizard": {}
    }
}

Now if I run cordova prepare android a second entry of com.pylonproducts.wifiwizard shows up in the dependencies.

"dependencies": {
    "wifiwizard": "~0.2.11",
    "com.pylonproducts.wifiwizard": "~0.2.11"
},

Now if I try to run npm i, as my build system is doing, I get an error:

$ npm i
npm ERR! code E404
npm ERR! 404 Not Found: com.pylonproducts.wifiwizard@~0.2.11

Furthermore, if you try to remove the package you get an error:

$ cordova plugin rm wifiwizard
Error: Plugin "wifiwizard" is not present in the project. See `cordova plugin list`.

If you use npm un com.pylonproducts.wifiwizard you get the same thing.

What's going on here?

Monarch73 commented 2 years ago

Hi ,

I ran into the same problem. I got the build command to work by removing the "com.pylonproduct."-prefix from the package json.