0

I'm trying to build a prod version of ABP 3.4.1 but when I run yarn run ng build --prod I get the following exception:

11% building modules 11/14 modules 3 active 
...\bootstrap\dist\css\bootstrap.min.cssNode#moveTo was deprecated. Use 
Container#append.                     Date: 2018-01-08T13:43:30.326Z
Hash: 988f3df7ec204a6033a2
Time: 21028ms
chunk {0} styles.e1f5a87bb585ebbb225d.bundle.css (styles) 414 kB [initial]
[rendered]   
chunk {1} polyfills.3bc34265385d52184eab.bundle.js (polyfills) 86 bytes 
[initial] [rendered]
chunk {2} main.e402deade8b026b7d50e.bundle.js (main) 84 bytes [initial] 
[rendered]
chunk {3} inline.a6814d03da59c81640d4.bundle.js (inline) 1.45 kB [entry] 
[rendered]

ERROR in : "let-" is only supported on ng-template elements. ("
  </thead>
  <tbody>
    <template ngFor [ngForOf]="rows" [ERROR ->]let-rowz="$implicit" let-index="index">
    <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].sec")
: "let-" is only supported on ng-template elements. ("
  </thead>
  <tbody>
    <template ngFor [ngForOf]="rows" let-rowz="$implicit" [ERROR ->]let-index="index">
      <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].sec")

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I cannot figure out where this error is occurring but after searching I found this post suggesting I set --aot=false but then I get the following error:

11% building modules 13/19 modules 6 active 
...\bootstrap\dist\css\bootstrap.min.cssNode#moveTo was deprecated. Use 
Container#append.                      94% asset optimization(node:2080) 
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token: punc ({)
(node:2080) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 60.77s.

What can I do to get the prod version building correctly?

Andre Odendaal
  • 557
  • 6
  • 19

1 Answers1

1

Answered in this issue: https://github.com/valor-software/ngx-bootstrap/issues/3024

Use ngx-bootstrap@2.0.0-beta.8

Set this in angular/package.json:

"ngx-bootstrap": "^2.0.0-beta.8",
aaron
  • 39,695
  • 6
  • 46
  • 102
  • That helped but now I'm getting the error ```94% asset optimization(node:19940) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token: punc ({) (node:19940) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.``` – Andre Odendaal Jan 08 '18 at 16:59
  • Did you clean your **node_modules** folder? – aaron Jan 08 '18 at 17:24
  • I deleted the **node_modules** folder and re-installed but I continue to get the same error – Andre Odendaal Jan 10 '18 at 05:33
  • @AndreOdendaal This [has been fixed](https://github.com/aspnetboilerplate/module-zero-core-template/issues/176) by using `ngx-bootstrap` `v2.0.2` (and `ngx-pagination` `v3.0.3`). Can you check? – aaron Jan 30 '18 at 10:24
  • @AndreOdendaal This has been fixed in v3.5.0 of the template. – aaron Feb 02 '18 at 17:15
  • I'm sorry I haven't responded. The project got put on hold while another crisis happened. I deleted my node_modules and me the updates but I'm getting the same error. I'm going to download a new version of the template and migrate my code. – Andre Odendaal Mar 01 '18 at 11:46