Discover Meteor Book: Error in Routing Chapter with Spinner


#1

I’m following the wonderful Discover Meteor book (for a second time) and on the routing chapter. The last time I hung out with Meteor was pre-1.0 last year. Anyway, once i get to the part about the spinner using sacha:spin and I have added the {{>spinner}} partial to my loading.html template, I get the following error in my console:

Uncaught TypeError: Template.spinner.onRendered is not a function
  (anonymous function) @ spinner.js:1
  (anonymous function) @ sacha_spin.js?85181c1cfc02a56a61e22914f4d780a2f644d4df:492
  (anonymous function) @ sacha_spin.js?85181c1cfc02a56a61e22914f4d780a2f644d4df:499

Has something changed since the last update to the book? I’m wondering if maybe the package changed but the book hasn’t caught up yet.

Version of relevant packages for your reference:

  • iron:router@1.0.9
  • sacha:spin@2.3.1
  • meteor@1.1.4
  • meteor-platform@1.2.1

Thanks!


#2

I’m going to go ahead and answer my own question because I am an idiot sometimes. :smiley:

For anyone else who encounters this it was a simple package version issue. I was using the latest sacha:spin but not the latest Meteor (which is 1.2). So spin correctly had the callback as onrendered but in the older versions of Meteor it expects rendered.

A simple meteor update solved the problem.

Thanks for a great book and great community! I am building my very first dream application in Meteor and it’s not only easy to put together but it’s a hell of a lot of fun!