如何在Bluemix上部署Angular 2应用程序? [英] How do I deploy an Angular 2 app on Bluemix?

查看:65
本文介绍了如何在Bluemix上部署Angular 2应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在Bluemix上部署一些基本的Angular 2项目,并且在构建后仅得到错误.

I have tried to deploy a few basic Angular 2 projects on Bluemix and got only errors after the build.

有人设法让Angular 2在Bluemix上工作吗?在那种情况下,您是否在package.json文件中设置了特定的内容?

Did anybody manage to have Angular 2 working on Bluemix? In that case, did you set anything specific in package.json file?

我无法克服此错误消息:

I couldn't get over this error message:

npm ERR! code ELIFECYCLE
npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "run" "tsc:w"

推荐答案

发布示例或指向您的源代码的链接非常好.但是从两条日志行中听起来,您似乎正在尝试部署Angular 2应用程序,包括其随附的Node.js工具.

It would be great to post a sample or a link to your source code. But from the two log lines it sounds like you are trying to deploy the Angular 2 app including the Node.js tooling it comes with.

如前一条评论所述,您宁愿构建Angular 2应用并部署结果文件,并保留Node.js工具用于本地开发.

As pointed by the previous comment, you'd rather build your Angular 2 app and deploy the resulting files, keeping the Node.js tooling for your local development.

我整理了一个示例,只是做了 https://github.com/l2fprod/bluemix-hello-angular2 .将其视为上述示例的更简单版本.

I've put together a sample doing just that https://github.com/l2fprod/bluemix-hello-angular2. Consider it an even simpler version of the above example.

这是一个使用 angular-cli 生成的新项目,然后我做了最低要求进行了更改,以将构建部署到Bluemix.

It is a new project generated with the angular-cli, then I did the minimum required changes to deploy the build to Bluemix.

这篇关于如何在Bluemix上部署Angular 2应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆