27

Other platforms are working fine... but I'm having an issue getting browser platform to work at all.

If I run cordova platform add browser it creates the dir, copies all the files, and things mostly looks like it works right except the console outputs "Error loading cordova-browser".

If I then run prepare or anything I get the same error in yellow

Error loading cordova-browser

If I run cordova requirements... same thing, says Error loading cordova-browser

I'm on Node v6.2.0 and Cordova v6.4.0

--update If I keep removing and adding in the platform things seem to work, ts transpiled and everything updated and moved correctly, and I can run from the www folder and everything serves up right. If I just run prepare or build though, the files in platform/browser do not get updated.

Joshua Ohana
  • 5,613
  • 12
  • 56
  • 112
  • Please try to debug this using and check what is wrong : ionic build browser --desktop --testing – Manu Nov 02 '16 at 13:08
  • 1
    I am getting this error also, and `ionic build browser --desktop --testing` didn't say anything except the `Error loading cordova-browser` message. However, it did update the files in the platform dir, unlike the post author's issue. And all hooks ran as well. – flanger001 Nov 07 '16 at 07:47
  • Yes same here @flanger001, what I've been using in is `ionic build browser --desktop --testing && http-server platforms/browser/www/` which gets the job done well enough, and pulls in everything necessary. I hope it gets resolved so I can use serve with hooks and js though – Joshua Ohana Nov 08 '16 at 01:54
  • Most likely due to https://issues.apache.org/jira/browse/CB-12088 – ralfthewise Nov 30 '16 at 01:08

2 Answers2

19

Cordova CLI 6.5.0 has been released, the error should be fixed

That is just a misleading error message, nothing is really failing and browser platform works just fine. The issue was reported and fixed, but not released yet.

jcesarmobile
  • 51,328
  • 11
  • 132
  • 176
4

I had the same problem when I upgraded from Cordova 6.3.1 to 6.4.0. Downgrading back to the 6.3.1 seems to fix the problem for me.

Obviously not a long-term solution, but it works for now.

John Ellmore
  • 2,209
  • 1
  • 10
  • 22