简体   繁体   English

将Meteor + Angular2应用程序部署到Heroku

[英]Deploying Meteor + Angular2 app to Heroku

I have an app I'm writing using Meteor, Angular2 (using the angular-meteor package), Typescript, and MongoDB. 我有一个正在使用Meteor,Angular2(使用angular-meteor包),Typescript和MongoDB编写的应用程序。 I'm trying to put it up on Heroku and running into difficulties. 我试图将其放在Heroku上并遇到困难。 I'm using this meteor buildpack . 我正在使用这个流星buildpack I'm not sure whether the problems are with Meteor, Heroku, or Angular2, though I suspect it's something Heroku isn't configuring correctly for Angular2. 我不确定问题是否出在Meteor,Heroku或Angular2上,尽管我怀疑这是Heroku没有为Angular2正确配置的问题。 The site is at http://alfred-zahner.herokuapp.com/ and the error I'm getting is: 该站点位于http://alfred-zahner.herokuapp.com/ ,我收到的错误是:

EXCEPTION: No provider for t! 例外:没有提供者! (e -> t) (e-> t)

I've checked the Heroku logs and there is no sign of trouble there. 我已经检查了Heroku日志,那里没有出现故障的迹象。 Part of my problem is that I can't see what t and e are, as someone (Heroku?) is uglifying the JavaScript. 我的问题的部分原因是我无法看到te是什么,因为有人(Heroku?)在丑化JavaScript。 I'm not really sure how to proceed in debugging this. 我不太确定如何进行调试。

One way to solve this problem would be to figure out and fix the error, but I'd be happy if there's a better build pack, or even a better (must be free!) hosting environment that I could be using. 解决此问题的一种方法是找出并解决错误,但是如果有更好的构建包,或者甚至可以使用的更好的(必须免费的)托管环境,我将很高兴。

Edit 编辑

It's not Heroku's problem. 这不是Heroku的问题。 The same thing happens when deploying to Meteor's built in deployment testing ( meteor deploy site.meteor.com ). 当部署到Meteor的内置部署测试( meteor deploy site.meteor.com )时,会发生同样的事情。 If I deploy using meteor deploy --debug site.meteor.com , however, it works, so Angular2 has some problem with the extra processing that happens when Meteor prepares an app for production. 但是,如果我使用meteor deploy --debug site.meteor.com进行meteor deploy --debug site.meteor.com ,则它可以工作,因此Angular2在Meteor准备要用于生产的应用程序时发生的额外处理方面存在一些问题。

On the angular2-meteor Github I found out that this is an issue with Angular 2 in particular, when using UglifyJS. angular2-流星Github上我发现,这是一个问题 ,在特定的角2,使用时UglifyJS。 For now, it seems the only solution is to use meteor deploy --debug . 目前看来,唯一的解决方案是使用meteor deploy --debug I'm planning to just use that on meteor's built in hosting until Angular 2 plays nicely. 我打算在流星的内置主机上使用它,直到Angular 2正常播放为止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM