【问题标题】:Error when deploying an angular 2 application on bluemix using angular-cli使用 angular-cli 在 bluemix 上部署 angular 2 应用程序时出错
【发布时间】:2016-08-17 13:57:45
【问题描述】:

我们正在尝试在 bluemix 上部署一个 Angular 2 应用程序。我们已经定义了一个构建和部署项目的管道,但是我们陷入了构建阶段。构建过程正在使用 angular-cli 为部署准备一个文件夹(ng build --prod),但它失败了:

The Broccoli Plugin: [BroccoliMergeTrees] failed with:
Error: Merge error: file index.html exists in /home/pipeline/7c14494a-d2b2-417f-be02-1007a2c8cfe7/tmp/broccoli_merge_trees-input_base_path-2MsSutn8.tmp/0 and /home/pipeline/7c14494a-d2b2-417f-be02-1007a2c8cfe7/tmp/broccoli_merge_trees-input_base_path-2MsSutn8.tmp/1

这应该适用于最新版本的节点,但没有高于 4.2.2 的节点版本。似乎在构建过程中可用。 有任何想法吗? 谢谢。

【问题讨论】:

    标签: angular ibm-cloud devops angular-cli broccolijs


    【解决方案1】:

    我们在一个需要 Node 4.4 的演示中也遇到了这个问题。这是我们设置构建管道的方式。我们在构建期间获取 nvm,然后安装任何版本的 Node:

    #!/bin/bash
    # nvm is not compatible with this option
    npm config delete prefix
    # get nvm
    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
    # load nvm    
    . ~/.nvm/nvm.sh
    # install Node 4.4
    nvm install 4.4
    
    # proceed with our specific code...
    npm install
    

    【讨论】:

      猜你喜欢
      • 2017-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-14
      相关资源
      最近更新 更多