Made a web application, back-end - Spring, front - Angular2. Deploit decided on Heroku. Deploitsya perfectly, the back-end works perfectly, but the front itself does not load. Project - https://github.com/BarexaS/Constructed.git

2016-11-08T15:41:04.303311+00:00 heroku[router]: at=info method=GET path="/node_modules/zone.js/dist/zone.js" host=organazi.herokuapp.com request_id=d3c3c81e-e02f-4380-8069-1b7224502e82 fwd="91.196.192.37" dyno=web.1 connect=0ms service=155ms status=404 bytes=542 2016-11-08T15:41:04.356715+00:00 heroku[router]: at=info method=GET path="/node_modules/systemjs/dist/system.src.js" host=organazi.herokuapp.com request_id=7c31ae80-f595-4adf-93b6-a9c093d1d8e7 fwd="91.196.192.37" dyno=web.1 connect=0ms service=193ms status=404 bytes=549 2016-11-08T15:41:04.519669+00:00 heroku[router]: at=info method=GET path="/node_modules/reflect-metadata/Reflect.js" host=organazi.herokuapp.com request_id=7c06414e-4cfb-489f-8d8a-eeab8a14d2c0 fwd="91.196.192.37" dyno=web.1 connect=0ms service=123ms status=404 bytes=549 2016-11-08T15:41:04.680541+00:00 heroku[router]: at=info method=GET path="/node_modules/systemjs/dist/system.src.js" host=organazi.herokuapp.com request_id=b9e31d43-0ba8-4a84-b21a-50f981bdb7c9 fwd="91.196.192.37" dyno=web.1 connect=0ms service=38ms status=404 bytes=549 2016-11-08T15:41:04.829222+00:00 heroku[router]: at=info method=GET path="/systemjs.config.js" host=organazi.herokuapp.com request_id=9a1fb274-6355- 4ff2-a7f1-d7624700ff53 fwd="91.196.192.37" dyno=web.1 connect=0ms service=18ms status=200 bytes=2077 2016-11-08T15:41:04.992681+00:00 heroku[router]: at=info method=GET path="/login/blue-sky-hd-wallpaper-2.jpg" host=organazi.herokuapp.com request_id=1c74584b-f2ff-4c3a-9a26-46efb41803f8 fwd="91.196.192.37" dyno=web.1 connect=0ms service=25ms status=200 bytes=52476 

This is the problem, the file "systemjs.config.js" as well as the picture "/login/blue-sky-hd-wallpaper-2.jpg" loads excellent, but the Angulyar itself does not want to "node_modules", I have been trying for 2 weeks solve the problem, maybe there are ideas how to solve it?

  • I do not know what is Heroku, but judging by the logs, these files are simply missing from the requested uri, can it look if they are actually where they are? ) - Dimanoid

1 answer 1

A couple of comments about the code from what I see in turnips:

  1. Keeping the .idea , target and node_modules folders in the repository is a bad decision, since the size of the repository can very quickly exceed the available limits. A little justification can be found here .
  2. Using raw sources for any language is, in principle, considered a bad tone, as it can greatly affect application performance. Justification and review of solutions can be found in the article on minification, obfuscation and compression of js / css code in order to optimize performance. In your development, rely on the capabilities of the same Heroku to perform pre-deploy steps, for example, building a maven / gulp project.

Just as a result of the fact that you relied in the depot on the raw source code of libraries, played a cruel joke. If you check the contents of node_modules in the master branch, then you will not find there just those files that your application cannot find.