2

I have recently upgraded from Angular 4 to Angular 7 and got into some issues on production build when running ng build --prod. The error I put in the title is from the node_module dependency. However, I had around 15 pipe filters that I commented throughout the code to make sure I didn't do anything wrong in terms of module importing and dependencies, which now hits the node_module dependency and break the build with the same error.

For instance if I un-comment one of my filters in my code

    <td>{{ item.registeredDate | date }}</td>

I get the following error:

    ERROR in : Template parse errors:
    The pipe 'date' could not be found ("<td>{{[ERROR ->]item.registeredDate | date }}</td>")

I can provide more details.

Thanks,

  • Looks like you need to disable ivy in your `tsconfig`: [GitHub issue](https://github.com/akveo/nebular/issues/1122#issuecomment-451499779), [SO answer](https://stackoverflow.com/a/53120833/4362829). – Tim Klein Apr 16 '19 at 13:50
  • I did that I get the following errors: ``` ERROR in : Error: Internal error: unknown identifier undefined at Object.importExpr$$1 [as importExpr] (path_to_my_project/node_modules/@angular/compiler/bundles/compiler.umd.js:24166:27) ``` – user3912186 Apr 16 '19 at 14:00
  • Did you follow the steps mentioned in https://update.angular.io/ while upgrading? – Ashok Apr 16 '19 at 16:19

1 Answers1

-1

I guess you try to upgrade to angular 7 directly. You can not immigrate to angular 7, from 4. You should upgrade to angular 5, and build a prod, (ng build --prod; ng serve) then from angular 5 to 6 and then finally to 7.

Amir
  • 75
  • 1
  • 7