There is a problem when creating a production version of the project. When I load a project at the build stage using the gulp serve command, it works correctly, but when I collect the production version into the dist folder using the gulp build command, when it is opened later, only the first page index.html is started (routing as a whole does not work).

Here is the link to the repository of my project on github: https://github.com/reflection937/my_lab

I would be grateful for any help.

Closed due to the fact that off-topic participants Grundy , Bald , aleksandr barakin , lexxl , user194374 4 Aug '16 at 7:53 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reasons:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - aleksandr barakin, community spirit
  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Grundy, Bald, lexxl
If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    Error in the module name for templateCache in my_lab / gulp / build.js: 23 Your global module is called MyLabApp , the same should be specified there.

    module: 'MyLabApp', 

    The console in the browser says that it cannot find the module myLab.

    I hope helped. Good luck!

    PS The gulp build command only builds the build to a folder. To raise the server and see the result of the production build, you need the gulp serve:dist command gulp serve:dist ,

    • Thank you! It was precisely in this error. - Dmitry Parfenov