我是Meteor.js的新手,目前正在研究"leaderboard"
示例应用程序。插入一行代码后:“退出代码8”示例流星应用程序
Template.leaderboard.player = function(){
return "Some other text"
}
我在应用程序的接口接收到的错误:“你的应用程序崩溃下面是最新的日志”
世界,你好
/home/tomas/.meteor/packages/meteor-tool/.1.0.35.hgbesu++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:173
throw(ex);
^
ReferenceError: Template is not defined
at app/leaderboard.js:13:1
at app/leaderboard.js:17:3
at /home/tomas/leaderboard/.meteor/local/build/programs/server/boot.js:168:10
at Array.forEach (native)
at Function._.each._.forEach (/home/tomas/.meteor/packages/meteor-tool/.1.0.35.hgbesu++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at /home/tomas/leaderboard/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change."
我重新保存该文件,进入终端和停止服务器并重新启动它,并接受这一点:
=> Exited with code: 8
I20141122-11:01:32.695(-5)? Hello world
W20141122-11:01:32.697(-5)? (STDERR)
W20141122-11:01:32.699(-5)? (STDERR) /home/tomas/.meteor/packages/meteor-tool/.1.0.35.hgbesu++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:173
W20141122-11:01:32.701(-5)? (STDERR) throw(ex);
W20141122-11:01:32.702(-5)? (STDERR) ^
W20141122-11:01:32.708(-5)? (STDERR) ReferenceError: Template is not defined
W20141122-11:01:32.709(-5)? (STDERR) at app/leaderboard.js:13:1
W20141122-11:01:32.710(-5)? (STDERR) at app/leaderboard.js:17:3
W20141122-11:01:32.710(-5)? (STDERR) at /home/tomas/leaderboard/.meteor/local/build/programs/server/boot.js:168:10
W20141122-11:01:32.711(-5)? (STDERR) at Array.forEach (native)
W20141122-11:01:32.712(-5)? (STDERR) at Function._.each._.forEach (/home/tomas/.meteor/packages/meteor-tool/.1.0.35.hgbesu++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
W20141122-11:01:32.712(-5)? (STDERR) at /home/tomas/leaderboard/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.
我的研究表明,'Exited with code: 8'
是错误通常与尝试更改数据库相关联。我对流星非常陌生,我很欣赏输入。
首先不推荐使用'Template.templateName.helpername = function'语法。使用帮助程序块来创建helpers.ie。 'Template.leaderboard.helpers({球员:..})'。尝试使用'流星重置'命令重置应用程序。 – Rajanand02 2014-11-22 16:39:30