angular - Travis build 正在等待用户输入(安装 Angular )

标签 angular travis-ci

使用 Travis 构建应用程序时,构建在尝试安装 Angular 后挂起。它通过等待输入来做到这一点。

我浏览了文档,这些文档显示“等待键盘输入或其他类型的人机交互”时确实是这种情况。但我没有选择在任何地方这样做。我的 .travis.yml 是最新的并且符合预期。

我的.yml代码

language: node_js
node_js:
  - "11.0"
sudo: required
branches:
  only:
    - master
before_script:
  - npm install -g --silent firebase-tools
  - npm install -g @angular/cli
script:
  - npm install
  - ng build --prod
deploy:
  skip_cleanup: true
  provider: firebase
  token:
    secure: "1/St7DD3G1QTmK-hdghJoK4cS348_bxklRqbuM3t7KGuE"

after_success:
  - firebase deploy --token "1/St7DD3G1QTmK-hdghJoK4cS348_bxklRqbuM3t7KGuE" --non-interactive

Would you like to share anonymous usage data with the Angular Team at Google under Google’s Privacy Policy at https://policies.google.com/privacy? For more details and how to change this setting, see http://angular.io/analytics. (y/N) No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself. Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received The build has been terminated

最佳答案

你需要在你的 .travis.yml 文件中添加:

before_script:
  - export NG_CLI_ANALYTICS=ci

你可以找到here可供使用的在线样本。

关于angular - Travis build 正在等待用户输入(安装 Angular ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56363203/

相关文章:

css - 无法摆脱 x-overflow(滚动条被隐藏,但我仍然可以向右滚动)

javascript - Promise 的具体行为是什么?

c# - ASP.NET Core WebApp 不是基于 Travis CI 构建的

travis-ci - Travis CI,虚拟机的静态 IP

angular - 使用 nginx "no such file or directory"容器化 Angular 应用程序

angular - Typescript 对象动态分配更改 fieldName

angular - 如何从 Angular 4 的下拉列表中预选一个值

php - 如何使用 Travis CI 测试 laravel 5.2 项目

git - 如何让 travis 克隆 git SSH URLs?

travis-ci - Travis 以分支 after_success 为条件