error TS5023: Ukjent kompilatoren alternativet 'enableIvy'

stemmer
3

Jeg prøver å legge IVY til min vinkel 7 beta prosjekt. Så, jeg har lagt enableIvy: truetil src/tsconfig.app.jsoni compilerOptionsavsnitt

Men når jeg kjører ng build --prod --aot --output-hashing nonefår jeg under feil.

error TS5023: Unknown compiler option 'enableIvy'.

Error: error TS5023: Unknown compiler option 'enableIvy'.

    at AngularCompilerPlugin._setupOptions (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:112:19)
    at new AngularCompilerPlugin (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:61:14)
    at _createAotPlugin (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/typescript.js:41:12)
    at Object.getAotConfig (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/typescript.js:63:19)
    at BrowserBuilder.buildWebpackConfig (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/src/browser/index.js:81:37)
    at MergeMapSubscriber.rxjs_1.of.pipe.operators_1.concatMap [as project] (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/src/browser/index.js:31:38)
    at MergeMapSubscriber._tryNext (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/mergeMap.js:65:27)
    at MergeMapSubscriber._next (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/mergeMap.js:55:18)
    at MergeMapSubscriber.Subscriber.next (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:64:18)
    at TapSubscriber._next (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/tap.js:62:26)
    at TapSubscriber.Subscriber.next (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:64:18)
    at MergeMapSubscriber.notifyNext (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/mergeMap.js:84:26)
    at InnerSubscriber._next (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/InnerSubscriber.js:25:21)
    at InnerSubscriber.Subscriber.next (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:64:18)
    at ForkJoinSubscriber.notifyComplete (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/observable/forkJoin.js:79:25)
    at InnerSubscriber._complete (/Users/k26686/aniruddh/develop/experiment/shepherd/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/InnerSubscriber.js:32:21)

Enhver løst dette.

Publisert på 14/09/2018 klokken 18:36
kilden bruker
På andre språk...                            


3 svar

stemmer
3

prøve å inkludere enableIvyalternativ underangularCompilerOptions

"angularCompilerOptions": {
   "enableIvy": true
}
Svarte 18/09/2018 kl. 08:27
kilden bruker

stemmer
1

Nå den rette måten er satt

"angularCompilerOptions": {
   "enableIvy": "ngtsc"
}

dette er relatert til spørsmålet # 23455

Dette forplikter legger til en ny kompilator rørledning som ikke er avhengig av global analyse, referert til som 'ngtsc'. Denne nye kompilatoren nås ved å kjøre NGC med "enableIvy" satt til "ngtsc". Det gjenbruker samme initial logikk, men skaper en ny implementering av Program som utfører ikke den globale nivå analyse som AngularCompilerProgram gjør. Det vil være grunnlaget for produksjon Ivy kompilatoren.

Svarte 19/12/2018 kl. 16:07
kilden bruker

stemmer
0

compilerOptionsog angularCompilerOptionser to separate egenskaper i tsconfig.json . Du må legge "enableIvy": truetil angularCompilerOptionsog ikke compilerOptions:

tsconfig.json:

{
  "compilerOptions": {
  ....
  },
  "angularCompilerOptions": {
    "enableIvy": true
  }
}
Svarte 27/04/2019 kl. 17:53
kilden bruker

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more