Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Can't Build ANGULAR #4764


User avatar
0
simedbn created

Hello,

I have this problem while building Angular APP :

2018-02-28T19:22:48.5089544Z ##[command]D:\a\1\s\angular\node_modules.bin\ng.cmd build --prod 2018-02-28T19:23:03.1006710Z Node#moveTo was deprecated. Use Container#append.

Any Idea Please ?

Thank you


5 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    Hi

    It might be related with Angular. Some folks say run this to get it work;

    node --max_old_space_size=2048 ./node_modules/@angular/cli/bin/ng build --app app-name --prod
    

    See the issue <a class="postlink" href="https://github.com/angular/angular-cli/issues/8585">https://github.com/angular/angular-cli/issues/8585</a>

  • User Avatar
    0
    BobIngham created

    aspnet-core, angular 5.1.0 I was getting exactly the same problem.

    ng build -prod
    

    hanging at:

    14% building modules 40/52 modules 12 active ...ts\demo\default\base\style.bundle.cssNode#moveTo was deprecated. Use 92% chunk asset optimization
    

    This is not very helpful:

    node --max_old_space_size=2048 ./node_modules/@angular/cli/bin/ng build --app app-name --prod
    

    Is app-name "abp-zero-template" as per .angular-cli.json? If so the result is:

    Unable to find app with name or index. Verify the configuration in `.angular-cli.json`
    

    I downloaded a clean 5.1.0, run yarn and then the build --prod command. This worked ok which set me on the path of knowing there was something wrong with my configuration. I can find no --verbose flag for the build command and had to decouple third party components. I spent a couple of days removing third-party components one by one until I found the culprit, "ng-dynamic-forms". The build command can take a long time, in my case, with the --build-optimizer=false flag set it still took 30 minutes on a fairly hefty machine.

    I would recommend that you build your system each time you add a new third-party component, compatibility problems may not show up during development.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @BobIngham, updating to a newer version of angular-cli can also solve your problem with ng-dynamic-forms if you want to use it. angular-cli is also faster in the newest releases.

    I also suggest that don't use "--build-optimizer=false" if you don't need to.

  • User Avatar
    0
    BobIngham created

    @ismcagdas - thanks for the advice. I removed all references to ng-dynamic-forms, upgraded @angular/cli to the latest version and then re-installed ng-dynamic-forms and rebuilt without the build-optimiser. The compile was successful and reduced to a few minutes. Thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @BobIngham great :)