handlebars.js Uncaught TypeError:Object#<Object> has no method'call'

任何人都帮助handlebars.js的问题?

我使用在Centos 6.4上运行的句柄来预编译模板。 要安装这个我安装:

  1. npm:yum -y –enablerepo = epel install npm
  2. 首先inheritance以避免问题:npm install -ginheritance
  3. 然后把手本身:npm install -g handlebars

这给出了以下版本:

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

我正在使用requirejs来加载下面的应用程序:

  • jQuery v1.11.0
  • Underscore.js 1.6.0
  • 车把v1.3.0(含amd)
  • backbone.js 1.1.0

有没有人有一套版本号一起工作?

谢谢!

这是服务器上的句柄版本。 NPM安装最新的默认和版本2阿尔法是造成这个问题。 在Github上find这个修复( https://github.com/wycats/handlebars.js/issues/734 ):

  1. npm卸载handlebars -g
  2. npm install handlebars@1.3 -g

似乎现在工作正常,回去工作!

(感谢Mahesh的指针。)