我是Meteor的新手,正在尝试使Telescope运行。我采取了以下步骤;


安装流星
安装陨石
将Telescope下载或克隆到/ some / path
cd /一些/路径
运行MRT


但是当我运行localhost时,不断出现以下错误;

Your app is crashing. Here's the latest log. /Users/Thomas/.meteor/tools/5bf1690853/lib/node_modules/fibers/future.js:173
throw(ex);
^
ReferenceError: i18n is not defined
at app/Telescope/lib/locales/es.js:1:36
at app/Telescope/lib/locales/es.js:192:3
at /Users/Thomas/pcks_app/.meteor/local/build/programs/server/boot.js:155:10
at Array.forEach (native)
at Function._.each._.forEach (/Users/Thomas/.meteor/tools/5bf1690853/lib/node_modules/underscore/underscore.js:79:11)
at /Users/Thomas/pcks_app/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.


有谁能指出我正确的方向?

非常感谢,
汤玛士

最佳答案

该错误表明未定义i18n。

如您所见:https://github.com/TelescopeJS/Telescope/tree/master/packages

i18ntelescope-i18n包公开的名称空间。这是通过package.js函数在api.export()文件中定义的:

Package.on_use(function (api) {
    api.use(['ui'], 'client');
    api.add_files(['i18n.js'], ['client', 'server']);
    api.export('i18n');
});


首先要检查的是包在package文件夹中;并且它没有损坏。您应该从github存储库下载它并替换以确保。

可能出错的第二件事是.meteor/packages文件中缺少该软件包。确保包含所需的一切。这是仓库的原始文件:

# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

backbone
accounts-base
accounts-ui
accounts-password
accounts-twitter
spiderable
email
crypto-md5
momentjs
standard-app-packages
rss
iron-router
mailchimp
telescope-i18n
fast-render
spin
autoform
collection2
accounts-facebook
iron-router-progress
telescope-tags


https://github.com/TelescopeJS/Telescope/blob/master/.meteor/packages

07-24 18:00