Meteor-vue problem with mongoDB example

I had to reinstall my windows 10 virtual machine and install meteor+vue again. I need vue 2.6 for my work so I created default app with meteor create --vue-2 command.
In this default app I should see some links on localhost:3000 loaded from mongo collection. But there are none of them. When I inspect browser window I got 2 errors:

  1. [Vue warn]: Error in created hook: "TypeError: Cannot read properties of undefined (reading 'find')
  2. TypeError: Cannot read properties of undefined (reading 'find')

I observed the same behavior with older releases of meteor (2.8.2 or 2.7.3) with command meteor create --vue

When I create meteor project without vue flag just as meteor create it works fine and on localhost page i can see all links loaded from mongo collection.

Any idea why meteor+vue and mongo collection behave like that?

1 Like

So it seems I found solution. I tried the whole procedure on ubuntu and there I got error of version mismatch between vue and vue-template-compiler. Versions of Vue@2.6.14 and vue-template-compiler@2.6.10.
Then I set meteor npm install vue-template-compiler@2.6.14 -S. Error dissapeared but the vue-meteor example still didnt work.
So I used both vue and vue-template-compiler in version 2.6.10 and it finally worked. I applied whole procedure again on windows 10 with the same result. Its like there is something wrong with vue@2.6.14.

I am quite dissapointed of windows 10 because there was no error of version mismatch like on ubuntu…

1 Like

Hey @gardener hope everthing is all right there!
I have awesome news for you. I think this Vue2 issue is fixed in 2.11(currently in release candidate).
If you want to test, I leave below the commands.

  1. Move your currently meteor to a another place
    mv ~/.meteor ~/.prev_meteor
  2. install the new version
    curl\?release\=2.11.0-rc.0`` | sh
  3. Test what you want for this release(tools related)
  4. later revert Meteor to the original one
    rm -rf ~/.meteor && mv ~/.prev_meteor ~/.meteor
1 Like