Reputation: 41
Upgraded to the latest 0.6.0 of meteor and Collection API is not define, meteor does not start correctly any more:
ReferenceError: CollectionAPI is not defined
I copy pasted collectionapi to app "packages" folder, but still does not run. Is there anything else I have to do, to use Collection API with latest meteor 0.6.0?
meteor add collectionapi - says: collectionapi: already using
Thanks in advance for any kind of information and help!
Upvotes: 4
Views: 456
Reputation: 41
Yes, thanks for answers. Fix is also available for download in CollectionAPI github:
https://github.com/crazytoad/meteor-collectionapi/pull/12
Upvotes: 0
Reputation: 4030
I'm not sure 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 be getting the same problem with one of my packages, chartjs. It's now giving a similar error to yours, saying ReferenceError: Chart is not defined
. Previously Chart
was scoped to the window, so it could be accessed in my client JS files. It must be due to the scoping changes in 0.6.0, but I'm not sure yet how to resolve it - probably the package itself needs updating.
Update 2: Yup, akshat was dead right, the JS file at the heart of the chartjs package needed the var Chart
changing to just Chart
so it would be scoped to the window
object. Have sent a pull request to the package.
Upvotes: 1