Не удается собрать рабочую версию проекта Angular для ASP.NET Boilerplate

Я пытаюсь собрать рабочую версию ABP 3.4.1, но когда я запускаю yarn run ng build --prod, я получаю следующее исключение:

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.

Я не могу понять, где возникает эта ошибка, но после поиска я нашел этот пост, предлагающий установить --aot=false но затем я получаю следующую ошибку:

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.

Что я могу сделать, чтобы правильно построить рабочую версию?


person Andre Odendaal    schedule 08.01.2018    source источник


Ответы (1)


Ответ в этом выпуске: https://github.com/valor-software/ngx-bootstrap/issues/3024

Используйте [email protected]

Установите это в angular/package.json:

"ngx-bootstrap": "^2.0.0-beta.8",
person aaron    schedule 08.01.2018
comment
Это помогло, но теперь я получаю сообщение об ошибке 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. - person Andre Odendaal; 08.01.2018
comment
Вы чистили папку node_modules? - person aaron; 08.01.2018
comment
Я удалил папку node_modules и переустановил ее, но по-прежнему получаю ту же ошибку. - person Andre Odendaal; 10.01.2018
comment
@AndreOdendaal Это было исправлено с помощью ngx-bootstrap v2.0.2ngx-pagination v3.0.3). Вы можете проверить? - person aaron; 30.01.2018
comment
@AndreOdendaal Это было исправлено в версии 3.5.0 шаблона. - person aaron; 02.02.2018
comment
Извините, что не ответил. Проект был приостановлен, поскольку случился очередной кризис. Я удалил свои node_modules и обновления, но получаю ту же ошибку. Я собираюсь загрузить новую версию шаблона и перенести свой код. - person Andre Odendaal; 01.03.2018