Starting from a working simple project with AOT building correctly: BrainCrumbz/ngtools-webpack-demo/. Just adding Bootstrap CSS stylesheet and registering TabsModule.forRoot() causes the following:
ERROR in Error encountered resolving symbol values statically. Calling function 'TabsModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in D:/WS/JS/ngtools/ngtools-webpack-demo/src/app/module.ts, resolving symbol AppModule in D:/WS/JS/ngtools/ngtools-webpack-demo/src/app/module.ts
See this commit to see changes made and to repro issue.
Environment:
If it can help, same thing happens when dropping TabsModule and trying with e.g.:
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
// ...
BsDropdownModule.forRoot(),
or:
import { CollapseModule } from 'ngx-bootstrap/collapse';
// ...
CollapseModule.forRoot(),
this is most annoying kind of issues, cuz it works fine with angular-cli
Hi there. Any hint on this? Is there any way I can help?
Thank you
+1 same kind of error with BsDropdownModule
Could someone provide a repo with reproduction?
Has this been solved?
As far as I can't reproduce it anymore, counted as solved
[Sorry for late reply]. I see, that was not clear to me. When you say anymore, is that because you tried with repro linked in the opening comment, and now it works ok for you? Or you tried with a more recent version? Or you have another "working demo"?
@GiuseppePiscopo have you tried to use latest version which is 2.0.0-beta.8 now?
Thanks for suggestion. Still the same error message. Repro:
ok, now it's more clear to me, it's not ngx-bs issue
you have an issues with custom webpack config
please create stack overflow question with tags: angular webpack ngx-bootstrap
raw look at your setup didn't show me why it's broken
I see. Thanks for your feedback.
Sorry
Strange as it sounds, in my case, this error is not related to ngx-bootstrap at all. The error is caused by using typescript 2.4 string enum.
Yeah, it happens, my favourite useless issue is: app module has an error resolving modules metadata
And it fails with the link to first module, which usually is not a reason of an issue
Yes, link to the first module that does not belong to @angular/core. In my case, removing TabsModule, the error logs will be Calling function 'BsDropdownModule', function calls are not supported and so on.
imports: [
CommonModule,
TabsModule.forRoot(),
BsDropdownModule.forRoot(),
PopoverModule.forRoot(),
ModalModule.forRoot(),
....