Closed mlc-mlapis closed 6 years ago
It's not only Angular CLI apps, if they are compatible with ngc, everything should work.
Would you share minimal project so I can reproduce the issue?
OK, I'll prepare a simple demo. Let me 2 hours ...
Hi Minko, here is the demo project: https://github.com/mlc-mlapis/demo-angular-modal-gallery
It was used to solve some things with custom libs under AOT mode ... and now I just upgraded it to Angular 5.1.2 and RxJS 5.5.6. I also tested it again, if it runs JIT and AOT without problems. But now a bit different error message appeared when I tried to open the project in ngrev
... see below ... I also chose tsconfig.aot.json
(AOT) or tsconfig.json
(JIT) but the error was still the same.
All necessary steps to run it are published in README.
Oh, I see. Probably ngast uses your tsconfig.json
file. Will experiment a bit later.
@mlc-mlapis please try version 0.0.14, should be fixed.
Keep in mind that the UX is not great yet, so the window will freeze until your application gets loaded. This may take a while so please do not close the app if it's not responding.
@mgechev ... thanks for updated version 0.0.14, I tried it but the problem still pertains ... Cannot find the root module of your project.
Very interesting...Do you have at least 1 module with at least 1 bootstrap component?
... sure, you can see in the repository ... the main module is:
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
ReactiveFormsModule,
SliderModule,
ModalGalleryModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
@mlc-mlapis oh, sorry. Forgot about the link. Let me try to reproduce it :-).
Use this tsconfig.json
:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
"removeComments": true,
"noLib": false,
"lib": ["es2016", "dom"],
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true,
"typeRoots": ["../../node_modules/@types", "../../node_modules"],
"types": ["node", "jasmine", "systemjs"]
},
"compileOnSave": false,
"exclude": ["app/main-prod.ts"]
}
@mgechev ... hmm, tried many combinations ... and there are my final observations:
tsconfig.json
contains property "include": [...]
in "compilerOptions"
with any content, then opening a project ends with an error message:tsconfig.json
contains property "exclude": [...]
in "compilerOptions"
with any content, then opening a project ends with an error message (and doesn't contain property "include": [...]
):tsconfig.json
contains property "outDir": "...",
in "compilerOptions"
with any content, then opening a project ends with an error message (and doesn't contain property"exclude": [...]
):The only workable actual setting of tsconfig.json
is completely without parts "include": [...]
and "exclude": [...]
and "outDir": "...",
. I don't have any explanations for above combinations and it also seems that there are no reasons for such limitations .. when using of all 3 properties mentioned above is correct.
Thanks for the observations! I can embed this in the tool. Until then, we can use this issue as reference.
Happy holidays! :-)
We have apps compiled by only
ngc
without any problems and then bundled using other tools likeSystemJS Builder
,Rollup
,CC
, ... and it looks that it is not possible to open such projects inngrev
... selecting a correcttsconfig.json
file ... the following error message appears: