cordova Error: Cannot read property 'prepare' of undefined
Asked Answered
S

1

6

When you run cordova run browser --live-reload, the browser opens, but when you save index.html, localhost shuts down with the error "Error: Cannot read property 'prepare' of undefined." How do I fix it?

Sherlynsherm answered 20/11, 2019 at 3:2 Comment(1)
Anything on this issue?Orwin
L
0

In plugins -> cordova-plugin-browsersync -> lib -> pluginHook.js, update context.cordova.raw.prepare() to context.cordova.prepare().

Note, while this stops the error and rebuilds the app, the browser doesn't auto refresh. I have to manually refresh to see the changes. However, definitely a step in the right direction.

Lurk answered 25/7, 2024 at 14:42 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.