node.js - Travis CI build failed because of no output
问题描述
I am new to CI/CD tools. I have made CI/CD pipeline using travis CI. But my build is failed and it is giving me the following error :
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
So , basically build timed out because no output was received. What kind of output it is expecting?
.travis.yml file :
language: node_js
node_js:
- 10
script:
- node app.js
Screenshot of the Travis build :
package.json
{
"name": "seatmgmt",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"repository": {
"type": "git",
"url": "SeatManagement"
},
"author": "SJ",
"license": "MIT",
"dependencies": {
"express": "^4.17.1",
"socket.io": "^3.0.4"
}
}
解决方案
如果在运行console.log
命令时没有在日志中打印输出,Travis 会在 10 分钟后退出正在运行的构建。
您可以使用travis_wait
它来保持运行并且永不关闭
所以你会在你的脚本中替换:
- node app.js
和
- travis_wait node app.js
推荐阅读
- javascript - 是否可以将整个页面宽度放入滚动条反应?
- python - 明智地创建一个新列
- .net - 多个线程使用同一个 EventHubClient 对象发布事件是否安全?
- android - Marshmallow 上不同的 AnimatedVectorDrawable(变形动画,涉及 androidx)
- arrays - “文本到列 - 固定宽度”的 VBA 代码 - 循环
- c - 将内存分配给 const char*** 变量时出现错误“realloc(): invalid next size”
- android - 我不能从地图的迭代中存在
- javascript - 如何将 react-app-rewired 与 TypeScript 一起使用?
- excel - 在 Excel 版本 365 上为旧版本(即 Excel 2012)开发 VBA 应用程序
- facebook - Facebook API 上线时返回空集