How to deploy Angular 2 app on Bluemix?

I tried to deploy several basic Angular 2 projects on Bluemix and received only errors after the build.

Has anyone managed to work with Angular 2 on Bluemix? In this case, did you install something specific in the package.json file?

I could not overcome 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" 
+3
source share
4 answers

It would be great to post a sample or link to the source code. But from two lines of the log, it looks like you are trying to deploy an Angular 2 application, including the Node.js tool it comes with.

As stated in the previous comment, you better create an Angular 2 application and deploy the resulting files, while retaining the Node.js tool for your local development.

I put together a sample that only does https://github.com/l2fprod/bluemix-hello-angular2 . Consider this an even simpler version of the example above.

This is a new project generated using angular-cli , then I made the minimum necessary changes to deploy the assembly to Bluemix.

+5
source

I created a sample application using the Frederic Lavigne sample example, and deployed it to bluemix. https://github.com/joeydeluca/petstore-client-angular2

0
source

There are several ways to deploy an angular2 application on Bluemix.

I highly recommend deploying the application in a Docker container. This will give you more freedom in development.

Here is a post that I find very useful. http://heidloff.net/article/angular-2-bluemix-docker-nginx

Hope this helps

0
source

There is a new example of angular2 -on-bluemix, created from the official AngularJs 2 tutorial (Tour of Heroes): https://github.com/nnworkspace/angular2-heroes-bluemix

-1
source

All Articles