Phonegap is unable to install cordova plugins: The platform "browser" does not appear to be a valid cordova platform #749
Comments
I think this may just be an issue with an outdated version of cordova-browser. Just tried this on my machine and didn't see any problems. Could you try removing the browser platform and using the latest version, |
Hi @surajpindoria! Thanks so much for getting back to me. Yes, it worked to remove browser platform and add it again. I think there is a problem with phonegap templates generator, which installs old or corrupted browser version. Problem solved! Thanks! |
Great that you got it solved! And I think what happened is you may have ran |
@surajpindoria hmmm. Actually I don't use |
The PhoneGap Desktop app is still using |
Ahh! Okey! Thankx |
Just wanted to say that this still happens if you run a project from Phonegap Desktop, then afterwards try to install a plugin. The advice above also has a typo, people who have this issue must run this from the CLI: |
how solve this so? i want install admob plugin but cannot find: platforms\browser\cordova\api.js I try with |
Try separating the commands. |
It did work, but when I run the app, I get this errors
|
Your CSP is preventing you from running something with MIME type of 'text/html', but why is that script being served as that mime type instead of |
Finally found it, I had a very similar issue with android. Before this message I had to install several npm modules:
|
PhoneGap CLI, node & npm versions
Node: v8.5.0
Phonegap: v7.1.1
npm: v5.3.0
macOS: Sierra 10.12.6
Expected Behaviour
When running the command
$ phonegap plugin add plugin-name
it installs correctly the plugin (including all the platform dependencies and needed assets).Actual Behaviour
Phonegap CLI fails to install new plugins, because the browser platform is missing API.js.
Steps to Reproduce
$ phonegap plugin add cordova.plugins.diagnostic
Error messages
The text was updated successfully, but these errors were encountered: