Problem when I make the build #13
Replies: 8 comments 7 replies
-
I will take a look, can you please paste your code from app.module and the component that part where you using it. |
Beta Was this translation helpful? Give feedback.
-
ver-venta.component.ts:
Component part where I set the dialogPopup :
NOTE: If I remove the dependency injection (DialogBelonging) in ver-venta.component.ts, it keeps showing me errors when I make the build to production: Error: Invalid provider for the NgModule 'NgxAwesomePopupModule in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts'
Thanks. |
Beta Was this translation helpful? Give feedback.
-
hmm.... interesting, everything looks fine trying to find typo or something strange in code and I trying to reproduce the same but no success for now, do you use latest version of library currently that is 1.1.0? Is there any chance that you have that project public on git, so maybe I could try to reproduce the same environment and find out what went wrong there? BTW:
then you can have code autocomplete and have this: |
Beta Was this translation helpful? Give feedback.
-
Hello I am also having exactly the same problem when npm run build -- --prod is executed: ERROR in Invalid provider for the NgModule 'NgxAwesomePopupModule in .... - only instances of Provider and Type are allowed. You can take a look of the repo: https://github.com/DimoYa/AngularDotNetCorePoC |
Beta Was this translation helpful? Give feedback.
-
I've noticed that if a make only "ng build", it's work. So the problem is only when we use "--prod", apparently. |
Beta Was this translation helpful? Give feedback.
-
It appears that the compiler in some cases has issues with namespaces, the library is coded with namespaces which is one nice and useful typescript feature. Unfortunately, I will try to recode it without namespaces and see if that will fix the bug. |
Beta Was this translation helpful? Give feedback.
-
I managed to build your app @DimoYa, I need to make a few more tests before deploy release. I think that will be the solution, bugfix for this issue related to this topic. |
Beta Was this translation helpful? Give feedback.
-
Build issue should be fixed in release 2.0.0, notice there is one breaking change in the dynamic component constructor. Make sure that you upgrade the package to the latest version. |
Beta Was this translation helpful? Give feedback.
-
Hello! First I want to thank for the library, it's nice. I find an error when I make the build (ng build --prod):
Error: Invalid provider for the NgModule 'NgxAwesomePopupModule in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts'
Invalid provider for the NgModule 'NgxAwesomePopupModule in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts' - only
instances of Provider and Type are allowed, got: [ɵo in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵp in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵq in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵl in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵt in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵv in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵr in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, null, ?null?, ...]
Invalid provider for the NgModule 'NgxAwesomePopupModule in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts' - only
instances of Provider and Type are allowed, got: [ɵo in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵp in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵq in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵl in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵt in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵv in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, ɵr in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts, null, null, ?null?]
Can't resolve all parameters for ɵa in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts: (?, [object Object], [object Object]).
Can't resolve all parameters for ɵg in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts: (?, [object Object]).
Can't resolve all parameters for ɵi in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts: ([object Object], ?, [object Object]).
Can't resolve all parameters for ɵn in C:/Users/ARX0001161/Documents/MetamorfosisAngular/node_modules/@costlydeveloper/ngx-awesome-popup/costlydeveloper-ngx-awesome-popup.d.ts: ([object Object], ?, [object Object]).
Can't resolve all parameters for VerVentaComponent in C:/Users/ARX0001161/Documents/MetamorfosisAngular/src/app/ventas/pages/ver-venta/ver-venta.component.ts: (?, [object Object]).
I'm using Angular 11, what could be the problem? I'm new in angular, but I followed the "Get Started" correctly and in development the library works fine, the problem is only in the build.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions