Meteor 0.6.0 and the data collection API

Updated to 0.6.0 meteor and the Collection API is not defined, the meteor does not start correctly:

ReferenceError: CollectionAPI not defined

I will copy the collectionapi paste into the packages folder of the application, but it still does not start. Is there anything else I need to do to use the Collection API with the latest meteor 0.6.0?

meteor add collectionapi - says: collectionapi: already using

Thanks in advance for any information and help!

+4
source share
2 answers

I'm not sure if copying and pasting packages is a good idea. Have you tried reinstalling it with meteor remove collectionapi and then adding it again?

Update. I seem to have the same problem with one of my packages, chartjs . Now it gives you a similar error saying ReferenceError: Chart is not defined . Previously, Chart was tied to a window, so it could be obtained in my client JS files. This should be due to changes in the field of view in 0.6.0, but I'm still not sure how to solve it - perhaps the package itself needs to be updated.

Update 2: Yup, akshat was dead correctly, the JS file underlying the chartjs package needed to replace var Chart with Chart , so it would be bound to the window object. Send the transfer request to the package.

+1
source

Yes, thanks for the answers. The fix is ​​also available for download on CollectionAPI github:

https://github.com/crazytoad/meteor-collectionapi/pull/12

0
source

All Articles