Browser build doesn't work anymore


#1

Runs perfectly on localhost but When I try to build it with

ionic cordova build browser --prod --release

It throws me this error any fixes for this now??

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Unable to load PlatformApi from platform. Error: Cannot find module 'C:**\platforms\browser\cordova\Api.js’
Error: Uncaught, unspecified “error” event. (The platform “browser” does not appear to be a valid cordova platform. It is missing API.js. browser not supported.)
[ERROR] An error occurred while running cordova build browser (exit code 1).


#2

Anyone else trying to build or public their app on browser platform at some point?? I’m running Ionic 3.6.1


#3

I Hope this helps anyone in the future…

I fixed this issue by running:

ionic cordova platform rm browser --save

THEN

ionic cordova platform add browser@latest --save

I tried to remove the browser after the issue without the save flag and it said my browser was still installed. lol weird.

I hope this helps anyone in the future


#4

working for me, thanks a lot @jfan29 :+1:


#5

It worked for me.

I got this issue after update cordova versión to 7.1.0 but your advice solved it. Thanks a lot.


#6

My Hero =D It worked for me!