"enableIvy": true с ng serve больше не будет работать
Я обновил Angular до 8. И это работает. Но если я сделаю:
"angularCompilerOptions": {
"enableIvy": true
}
а затем я делаю нг, я получу сообщение "Не удалось скомпилировать"
Конечно, я искал в Google, но даже ошибки я не могу найти.
Так что если я сделаю:
"enableIvy": false
NG служить работ.
Но если я сделаю:
"enableIvy": true
Тогда это больше не работает. И я получаю это предупреждение:
ERROR in Tried to overwrite C:/source/nien/vital10-frontend/node_modules/ng2-dragula/dist/components/dragula.service.d.ts.__ivy_ngcc_bak with an ngcc back up file, which is disallowed.
i 「wdm」: Failed to compile.
ERROR in node_modules/ng2-charts/charts/charts.d.ts(53,22): error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of AdviceModule, but itself has errors
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of EcheqModule, but itself has errors
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of MeasurementModule, but itself has errors
node_modules/ng2-charts/charts/charts.d.ts(53,22): error TS-996002: Appears in the NgModule.imports of MeasurementModule, but could not be resolved to an NgModule class
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of ObjectiveModule, but itself has errors
node_modules/ng2-charts/charts/charts.d.ts(53,22): error TS-996002: Appears in the NgModule.imports of ObjectiveModule, but could not be resolved to an NgModule class
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of TrainingModule, but itself has errors
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of QrModule, but itself has errors
src/app/advice/advice.module.ts(45,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
src/app/training/training.module.ts(37,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
src/app/measurement/measurement.module.ts(42,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
src/app/objective/objective.module.ts(33,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
src/app/echeq/echeq.module.ts(104,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
node_modules/ng2-charts/charts/charts.d.ts(53,22): error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
src/app/qr/qr.module.ts(12,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
node_modules/ng2-pdf-viewer/src/app/pdf-viewer/pdf-viewer.module.d.ts(6,22): error TS-996002: Appears in the NgModule.imports of DossierModule, but could not be resolved to an NgModule class
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of DossierModule, but itself has errors
src/app/dossier/dossier-navigation/dossier-navigation.component.ts(8,14): error TS-996004: Present in the NgModule.exports of DossierModule but neither declared nor imported
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of ResourceModule, but itself has errors
src/app/shared/shared.module.ts(53,14): error TS-996002: Appears in the NgModule.imports of SettingsAccountModule, but itself has errors
Так что я могу сделать: enableIvy: true.
Спасибо
Ок, я сделал новый файл: ngcc.config.js и вставил этот код:
module.exports = {
packages: {
'ng2-dragula': {
entryPoints: { './dist': { ignore: true, } },
},
},
};
Но когда я это сделаю, тогда я буду служить. Я получаю эти ошибки:
ERROR in ../node_modules/ng2-charts/charts/charts.d.ts:53:22 - error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class
53 export declare class ChartsModule {
~~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of AdviceModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of EcheqModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of MeasurementModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
../node_modules/ng2-charts/charts/charts.d.ts:53:22 - error TS-996002: Appears in the NgModule.imports of MeasurementModule, but could not be resolved to an NgModule class
53 export declare class ChartsModule {
~~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of ObjectiveModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
../node_modules/ng2-charts/charts/charts.d.ts:53:22 - error TS-996002: Appears in the NgModule.imports of ObjectiveModule, but could not be resolved to an NgModule class
53 export declare class ChartsModule {
~~~~~~~~~~~~[0m
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of TrainingModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of QrModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
app/advice/advice.module.ts:45:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
45 export class AdviceModule {}
~~~~~~~~~~~~
app/training/training.module.ts:37:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
37 export class TrainingModule {}
~~~~~~~~~~~~~~
app/measurement/measurement.module.ts:42:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
42 export class MeasurementModule {}
~~~~~~~~~~~~~~~~~
app/objective/objective.module.ts:33:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
33 export class ObjectiveModule {}
~~~~~~~~~~~~~~~
app/echeq/echeq.module.ts:104:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
104 export class EcheqModule {}
~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
../node_modules/ng2-charts/charts/charts.d.ts:53:22 - error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
53 export declare class ChartsModule {
~~~~~~~~~~~~
app/qr/qr.module.ts:12:14 - error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors
12 export class QrModule {}
~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of DossierModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
app/dossier/dossier-navigation/dossier-navigation.component.ts:8:14 - error TS-996004: Present in the NgModule.exports of DossierModule but neither declared nor imported
8 export class DossierNavigationComponent implements OnInit {
~~~~~~~~~~~~~~~~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of ResourceModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
app/shared/shared.module.ts:53:14 - error TS-996002: Appears in the NgModule.imports of SettingsAccountModule, but itself has errors
53 export class SharedModule {}
~~~~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
i 「wdm」: Failed to compile.