3

更新

我将它上传到 Azure 并立即运行 - 我相信这个问题与 .env 文件有关,但我不能确定。

所以我按照这里的指南:

并试图将应用程序推送到 Heroku。我的所有配置变量都是正确的 - 但是,当应用程序在 heroku 上启动时,我收到:

/app/node_modules/stormpath/lib/ds/RequestExecutor.js:59
 npm ERR! VisualVMail@0.0.1 start: `node ./bin/www`
 npm ERR! Exit status 8
 npm ERR!
 npm ERR! Failed at the VisualVMail@0.0.1 start script.
 npm ERR! This is most likely a problem with the VisualVMail package,
 npm ERR! not with npm itself.
 npm ERR! Tell the author that this fails on your system:
 npm ERR!     node ./bin/www
 npm ERR! You can get their info via:
 npm ERR!     npm owner ls VisualVMail
 npm ERR! There is likely additional logging output above.
 npm ERR! System Linux 3.8.11-ec2
 npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "st

 npm ERR! cwd /app
 npm ERR! node -v v0.10.29
 npm ERR! npm -v 1.4.14
 npm ERR! code ELIFECYCLE
 npm ERR!
 npm ERR! Additional logging details can be found in:
 npm ERR!     /app/npm-debug.log
 npm ERR! not ok code 0

     throw new Error('request.uri field is required.');

有没有人能够让 Stormpath / nodejs / heroku 运行,尤其是使用这个示例应用程序?

4

3 回答 3

0

错误“request.uri field is required”来自stormpath库。查看堆栈跟踪会很有帮助,您可以在 /app/npm-debug.log 中查找它吗?它也可能在您的 heroku 日志中。

于 2014-07-01T14:40:12.263 回答
0

看起来你的 VisualVMail 包有问题——你能尝试调试一下吗?它在错误中说 request.uri 是必需的。

于 2014-07-01T00:04:19.707 回答
0

如果最近您使用了 Stormpath 自动插件 - 这是 Heroku 设置与 Stormpath 集成的方式的问题(反之亦然)。我已经向他们发送了错误报告。

在你的 Heroku 中Settings > Config Variables;如果您有一个名为 的变量STORMPATH_URL,请将其删除并添加一个名为的新变量STORMPATH_APPLICATION_HREF,并将其值作为您的应用程序的 href,例如https://api.stormpath.com/v1/applications/<appIDhere>.

然后它应该工作。


或者对于您的 env 文件,STORMPATH_APP_HREF应该是STORMPATH_APPLICATION_HREF.

于 2015-11-07T02:13:32.237 回答