handlebars.js Uncaught TypeError: Object #<Object> has no method 'call'
backbone.js, handlebars.js, javascript, node.js
Solution
It was the version of handlebars on the server. NPM installs the latest by default and the version 2 alpha was causing the issue. Found this fix on Github (https://github.com/wycats/handlebars.js/issues/734):
- npm uninstall handlebars -g
- npm install handlebars@1.3 -g
Seems to work fine now, back to work!
(Thanks Mahesh for the pointer.)
Problem
Anyone help with a problem with handlebars.js? I'm precompiling the templates using handlesbars running on Centos 6.4. To install this I installed: - npm: yum -y --enablerepo=epel install npm - inherits first to avoid an issue: npm install -g inherits - then handlebars itself: npm install -g handlebars This gives the following versions: - handlebars@2.0.0-alpha.1 /usr/lib/node_modules/handlebars - optimist@0.3.7 (wordwrap@0.0.2) - uglify-js@2.3.6 (async@0.2.10, source-map@0.1.31) I'm using requirejs to load the following with the app: - jQuery v1.11.0 - Underscore.js 1.6.0 - handlebars v1.3.0 (with amd) - backbone.js 1.1.0 Does anyone have a set of version numbers that work together? Thanks!