OnsenUI + VueJS: some versions do NOT work
-
Hi all,
I would like to inform that in some cases Onsen UI with VueJS do NOT work - it depends of files versions (and maybe something else…).
I have two similar projects in monaca.io.
This combination DOES work in monaca debugger and as a standalone application (built with monaca)
onsenui (both css and js): 2.7.0
vue-onsenui.js: 2.3.0
vue.min.js: 2.5.3Tis combinations DOESN’T work in monaca debugger and as a standalone application (built with monaca)
onsenui (both css and js): 2.8.1
vue-onsenui.js: 2.3.0 or 2.4.0
vue.min.js: 2.5.3The strange things is that on some phones it works and on some it doesn’t work (both in monaca debugger and standalone app).
There is an error from monaca debugger: “undefined is not a function www/lib/onsenui/js/vue-onsenui.js 1439”.
How to solve it?
-
@Pablo We update
onsenui
andvue-onsenui
at the same time to ensure compatibility (except patch versions, which shouldn’t have breaking changes).vue-onsenui
package hasonsenui
as peer dependency specifying the compatible version. Basically, it will work if you use the latest versions of both packages. Otherwise, check thevue-onsenui
requirements foronsenui
version.vue-onsenui@2.4.x
requiresonsenui@2.8.x
, andvue-onsenui@2.3.x
requiresonsenui@2.7.x
.The strange things is that on some phones it works and on some it doesn’t work
That sounds like a bug. Try with
vue-onsenui@2.4.2
because it fixes a related issue.
-
1st: I can confirm you are right. Using the latest versions of OnsenUI and Vue-OnsenUI works like a charm.
2nd: Thank you for your response, help and “the fix”.I like OnsenUI so much! :-)