部署node应用到Heroku超时

3

我在安装delayed-stream时,经常在heroku节点构建包编译过程中遇到超时问题。大约1分钟后,它就会停在这个环节,直到15分钟的超时时间。还有其他人见过这个问题吗?

npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
       npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25","npm":"1.3.24"})
       npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25","npm":"1.3.24"})
       npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25","npm":"1.3.24"})
       npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.25","npm":"1.3.24"})
       npm http 200 https://registry.npmjs.org/delayed-stream/0.0.5
       npm http GET https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz
       npm http 200 https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz


 !     Timed out compiling Node.js app (15 minutes)
 !     See https://devcenter.heroku.com/articles/slug-compiler#time-limit

尝试运行 npm cache clean,然后再次运行。 - dewd
1个回答

4

一个三级依赖包含了一个来自git的模块,但没有使用https协议。

您可以运行npm ls命令获取所有模块的完整依赖关系图。要查找使用http而不是https的不良依赖项,可以使用npm ls | grep http://命令。


我现在遇到了这个问题。不幸的是,我不理解你的答案。你是如何解决这个问题的? - dewd
我发现了一个嵌套依赖项,它是通过http(从git)包含的。我不得不分叉每个父依赖项,直到坏依赖项,并更改为依赖于我的分支。例如,仓库看起来像myPackage-> grandparent-> parent-> bad http dep。创建fork parent和grandparent。将parentFork更新为包含https的dep,将grandparentFork指向parentFork而不是parent。然后更新我的package.json以指向grandparentFork。现在我的deps看起来像myPackage-> grandparentFork-> parentFork-> https dep。 - Ted Tomlinson
请注意,您应该向父组件发出完整的请求,以修复错误的依赖项。如果它被合并并发布到npm,则无需使用您的分支。 - Ted Tomlinson
我猜我的问题不一样。我正在使用node安装cordova。似乎npm因全局(-g)参数而失败。我猜这可能与我的网络设置有关。没有-g时,它可以正常工作。 - dewd

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接