使用angular-cli在bluemix上部署角度2应用程序时出错
问题描述:
我们正试图在bluemix上部署角度2应用程序。我们已经定义了一个构建和部署项目的管道,但是我们被困在构建过程中。构建过程是使用角CLI来准备部署一个文件夹(NG建立--prod),但它未能于:使用angular-cli在bluemix上部署角度2应用程序时出错
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。似乎在构建过程中可用。 任何想法? 谢谢。
答
对于需要节点4.4的一个演示,我们也遇到了这个问题。以下是我们如何设置我们的构建管道。我们在构建期间获得nvm,然后安装任何版本的节点:
#!/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