重新安装后,流星不断崩溃

时间:2015-10-19 21:36:49

标签: meteor crash deploying

我正在尝试在localhost上运行我的项目,但每当我尝试崩溃时。我甚至尝试将它直接部署到流星网站,但没有任何反应。它突然发生了。一切都工作正常,直到我添加了“tap:i18n”和“accounts-facebook”包。

    /Users/haraldur/.meteor/packages/meteor-tool/.1.1.9.1sd3e7j++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
                    throw(ex);
                          ^ReferenceError: ServiceConfiguration is not defined
at lib/app.js:29:1
at /Users/haraldur/myapp/.meteor/local/build/programs/server/app/lib/app.js:47:4
at /Users/haraldur/myapp/.meteor/local/build/programs/server/boot.js:242:10
at Array.forEach (native)
at Function._.each._.forEach (/Users/haraldur/.meteor/packages/meteor-tool/.1.1.9.1sd3e7j++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /Users/haraldur/myapp/.meteor/local/build/programs/server/boot.js:137:5

退出代码:8 您的应用程序崩溃了。等待文件更改。

3 个答案:

答案 0 :(得分:0)

这是我的app.js文件。我甚至没有第47行。我很困惑。

Timeouts = {};

// Initialize my collections
Rooms = new Meteor.Collection("rooms");
Videos = new Meteor.Collection("videos");
Messages = new Meteor.Collection("messages");
Votes = new Meteor.Collection("votes");
Favorites = new Meteor.Collection("favorites");
Skips = new Meteor.Collection("skips");

Cache = {};
Cache.Spotify = new Meteor.Collection("cache_spotify");
Cache.YouTube = new Meteor.Collection("cache_youtube");
Cache.Echonest = new Meteor.Collection("cache_echonest");
Cache.Freebase = new Meteor.Collection("cache_freebase");

// Dependencies for YouTube player
youtubeApiReady = false;
youtubePlayerReady = false;

youtubeApiDependency = new Deps.Dependency;
youtubePlayerDependency = new Deps.Dependency;

onYouTubeIframeAPIReady = function(){
    youtubeApiReady = true;
    youtubeApiDependency.changed();
}

ServiceConfiguration.configurations.remove({
  service: "twitter"
});
ServiceConfiguration.configurations.insert({
  service: "twitter",
  consumerKey: APIKeys.twitter.consumerKey,
  secret: APIKeys.twitter.secret
});

答案 1 :(得分:0)

accounts-facebook看起来需要特定的配置

尝试将service-configuration添加到您的应用

meteor add service-configuration

参考https://atmospherejs.com/meteor/service-configuration

答案 2 :(得分:-1)

由于添加这两个软件包似乎是罪魁祸首,请尝试一次删除一个软件包。我会先:

meteor remove tap:i18n

尝试运行它。如果仍然失败,请尝试:

meteor remove accounts-facebook

......再试一次。

或者首先,您可能希望了解这两个位置的内容:

lib/app.js:29:1
lib/app.js:47:4

IOW,你的app.js文件第29行,char 1和第47行char 4的内容是什么。也许那里有一些问题,但如果它在添加这两个包之前有效,可能不会。