Ionic-framework: ERROR in changeDetection must be a member of ChangeDetectionStrategy enum from @angular/core

Created on 29 May 2019  路  7Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic version:
"@ionic/angular": "^4.4.2"
node 12.3.1

Current behavior:
When activating ivy compiler ionic fails to compile with the following message:

ERROR in changeDetection must be a member of ChangeDetectionStrategy enum from @angular/core

Expected behavior:
Doesn't fail to compile

Steps to reproduce:

ionic start ionic-angular-ivy blank --type=angular

add this to your tsconfig.json

  "angularCompilerOptions": {
    "enableIvy": true
  }

then call

ng update @angular/cli @angular/core --force

finally build the empty project

ng build

Related code:

Here's a github link to a sample project ready to fail:

https://github.com/plchampigny/ionic-angular-ivy

Other information:

I do think the problem comes from this file:

https://github.com/ionic-team/ionic/blob/9030dcc111cc6486d22b45852a9906d18fa51f0c/angular/src/directives/proxies.ts since it's one of the only usage from changeDetection within ionic and you aren't using the values from the ChangeDetectionStrategy enum.

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (C:\Users\Cactus\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.800.0
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 8.0.0
   @ionic/angular-toolkit        : 1.5.1

System:

   NodeJS : v12.3.1 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

investigation angular

Most helpful comment

Added a PR to backport this fix on the branch 0.18.x used by the current version of @ionic/core:
https://github.com/ionic-team/stencil/pull/1578

All 7 comments

After digging more, I think the problem come from stencil code generation. I'll create a PR on their side and link it here

Added a PR to backport this fix on the branch 0.18.x used by the current version of @ionic/core:
https://github.com/ionic-team/stencil/pull/1578

Nice one! I can confirm it and wondered why this happened ;)

In general this topic can be closed, but I keep it open until it's fixed maybe with your PR

Is there an update on this? Is it on the horizon any time soon?

I see stencil has moved on to v1.0.2 already and they seem to have it fixed.

any workaround until this gets resolved?

@paulstelzer I think this can be closed since its been fixed in v4.6 by updating to stencil 1.0

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandyscarney picture brandyscarney  路  3Comments

BilelKrichen picture BilelKrichen  路  3Comments

brandyscarney picture brandyscarney  路  3Comments

manucorporat picture manucorporat  路  3Comments

daveshirman picture daveshirman  路  3Comments