Handlebars.js Uncaught TypeError: Object # <Object> does not have a 'call' method

Can anyone help with the handlebars.js problem?

I precompile templates using handlesbars running on Centos 6.4. To install this, I installed:

  • npm: yum -y --enablerepo = epel install npm
  • inherits first to avoid the problem: npm install -g inherits
  • then handled themselves: 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 use requirejs to download the following application:

  • 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!

+6
source share
1 answer

This was the version of the rudders on the server. NPM installs the latter by default, and version 2 alpha causes a problem. Found this fix on Github ( https://github.com/wycats/handlebars.js/issues/734 ):

  • npm deletion of -g descriptors
  • npm install handlebars@1.3 -g

It seems now to work well, get back to work!

(Thanks to Mahesh for the pointer.)

+17
source

All Articles