meteor - Handlebars is not defined error with package livestamp-hs -


i using package livestamp-hs in meteor app. works fine, except in console see error message: uncaught referenceerror: handlebars not defined, caused package (helpers.js):

if(meteor.isclient) {     handlebars.registerhelper('livestamp', function(timestamp) {       return new handlebars.safestring('<span class="livestamp" data-livestamp="'+ timestamp  +'"></span>');     }); } 

i checked package.js of package see if handlebars being used, , far know ok:

package.on_use(function(api) {     api.use(['jquery', 'handlebars'], 'client');      api.add_files(['moment.min.js', 'livestamp.min.js', 'helpers.js'], 'client');  }); 

although not big problem on localhost, causes infinite loop when deploying either meteor.com or heroku.com. ideas solve this?

in meteor 0.8, handlebars package replaced ui package. you'll want use in package.js file ensure pull in.

handlebars.registerhelper still works, ui.registerhelper new syntax.

on note, livestamp last decade's way of creating updated timestamps. recommend meteor-based way use time on client, reactive , synced server time: https://github.com/mizzao/meteor-timesync. (disclaimer: maintain package.)


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -