我正在尝试将我的应用程序升级到使用新Blaze模板引擎的Meteor 0.8。
$ meteor update
my-app: updated to Meteor 0.8.0.
$ mrt update
问题是我正在使用Jade,在运行流星后,它提示:
While building the application:
<runJavaScript-38>:167:38: Object #<Object> has no method 'compile' (compiling modules/homepage/client/views/_homepage.jade)
at Object.html_scanner._handleTag (<runJavaScript-38>:167:38)
at Object.html_scanner.scan (<runJavaScript-38>:118:20)
at handler (<runJavaScript-38>:526:30)
我在the new blog post看到我需要用陨石添加玉石。
mrt add jade
但是现在,通过运行Meteor,会出现以下错误:
=> Started proxy.
=> Started MongoDB.
=> Starting your app...
/Users/mac/.meteor/tools/c2a0453c51/lib/node_modules/fibers/future.js:173
throw(ex);
^
TypeError: Cannot read property 'name' of undefined
at /Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:750:28
at Function._.each._.forEach (/Users/mac/.meteor/tools/c2a0453c51/lib/node_modules/underscore/underscore.js:87:22)
at /Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:745:9
at Array.forEach (native)
at Function._.each._.forEach (/Users/mac/.meteor/tools/c2a0453c51/lib/node_modules/underscore/underscore.js:79:11)
at [object Object]._.extend._allHandlers (/Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:744:7)
at [object Object]._.extend.registeredExtensions (/Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:768:24)
at [object Object].slice.getSourcesFunc (/Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:1713:41)
at [object Object]._.extend.build (/Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:279:17)
at /Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:1088:13
at Array.forEach (native)
at Function._.each._.forEach (/Users/mac/.meteor/tools/c2a0453c51/lib/node_modules/underscore/underscore.js:79:11)
at [object Object]._.extend.build (/Users/mac/.meteor/tools/c2a0453c51/tools/packages.js:1087:7)
at [object Object]._.extend.getForApp (/Users/mac/.meteor/tools/c2a0453c51/tools/library.js:285:9)
at /Users/mac/.meteor/tools/c2a0453c51/tools/bundler.js:1762:25
at Object.capture (/Users/mac/.meteor/tools/c2a0453c51/tools/buildmessage.js:191:5)
at Object.exports.bundle (/Users/mac/.meteor/tools/c2a0453c51/tools/bundler.js:1697:31)
at [object Object]._.extend._runOnce (/Users/mac/.meteor/tools/c2a0453c51/tools/run-app.js:396:32)
at [object Object]._.extend._fiber (/Users/mac/.meteor/tools/c2a0453c51/tools/run-app.js:520:28)
at /Users/mac/.meteor/tools/c2a0453c51/tools/run-app.js:340:12
我看不出错误的来源。
答案 0 :(得分:0)
问题似乎来自belt-jade-handlebars包。我真的不知道发生了什么,但我想它不是最新的Blaze引擎。如果可以,请将其删除。
mrt remove belt-jade-handlebars.