如果我转到构建日志,我会看到以下内容:
-----> Node.js app detected
FATAL: ROOT_URL is not defined.
! Push rejected, failed to compile Node.js app.
! Push failed
这是我在终端中得到的:
remote: Building source:
remote:
remote: -----> Node.js app detected
remote: FATAL: ROOT_URL is not defined.
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to virtually-viral.
remote:
To https://git.heroku.com/virtually-viral.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/virtually-viral.git'
注意:我不知道该如何解决此问题并使我的应用程序正常工作,我已经检查了有关遇到某种类似问题的多次讨论,但我无法使用他们的解决方案来解决。
<。我对流星的了解不多,所以我不确定为什么在开发中起作用,也无法找到任何需要工作所需的关键设置的规范列表。我最接近的是Meteor.absoluteUrl
的文档(粗体添加):
生成指向应用程序的绝对URL。服务器从
时必须提供ROOT_URL
环境变量读取以确定其运行位置。对于部署到Galaxy的应用程序,这是自动处理的,但是使用meteor build
。
您应该能够通过在Heroku上设置ROOT_URL
变量来解决此问题,例如
heroku config:set ROOT_URL=https://virtually-viral.herokuapp.com
或通过网络接口。