1

我正在尝试使用这个包https://github.com/SimonDegraeve/meteor-jade-handlebars在流星中使用玉

我在一台Windows机器上。到目前为止,我已经按照此处的说明(www.discovermeteor.com/2013/03/20/using-meteor-and-atmopshere-on-windows/)设法使用了大多数陨石包

当我使用 .jade 文件在我的项目上运行“流星”时,出现此错误:

While building the application:
client\todos.jade: Jade compiler error: Cannot read property 'length' of undefin
ed

=> Your application has errors. Waiting for file change.
Terminate batch job (Y/N)?

我也尝试使用这个新叉子-> https://github.com/kynan/meteor-jade-handlebars/tree/refactor-for-meteor-0.6.5

同样的问题。

我在 Linux 机器上进一步测试了它,它运行良好。我不知道为什么这会在 Windows 上出现上述错误而失败。

4

2 回答 2

2

Try adding a blank extra line to the end of your file. For example, an extra line would be needed here.

template(name="name")
    h1 Hello!
于 2013-12-04T05:13:49.123 回答
0

我一直在处理很多问题,但终于让它jade-templating工作meteor了。这是如何工作的:

将此添加到smart.json,belt-jade-handlebars 是新版本流星的玉:

"packages": {
  "belt-jade-handlebars": {}
}

将此添加到.meteor/packages

belt-jade-handlebars

最后将额外的空白行添加到所有*.jade文件中。(用户3064375建议)

使用以下命令启动应用程序:

$ meteor run --release template-engine-preview-3

这将使用最新的模板引擎并启动流星。

于 2013-12-09T13:08:01.850 回答