You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to add in here, I have just tested this repo with Angular 8.2.0-next.2 and it has the same build failures.
In the referenced firebase issue it was suggested that this would be fixed by PR #30591 but this PR seems to have been merged, closed (although there seem to be more subsequent commits on it?) and is part of the Angular 8.2.0-next.2 package. The issue is unfortunately still present in this version.
Reacted by Adam Wamai Egesa, Максим Иванов, jase, Rocco Georgi and Sumanth Chinthagunta
FYI I've updated Angular version to the 9.0.0-next.5 in this repro.
It's built without errors but still there is a runtime error Can't resolve all parameters for RouterState: (?, ?, ?, ?, ?, ?, ?)..
When running ivy-ngcc, it fails when Compiling @ngxs/router-plugin : main as umd with:
Value at position 0 in the NgModule.imports of NgxsRouterPluginModule is not a reference: [object Object]
Also I've noticed that it fails with Can't resolve all parameters for RouterState because there is no ngInjectableDef and if I add it manually, then in works:
Thanks for additional information. I've looked at the code and it seems like the issue appears because there is insufficient type information provided when you use ModuleWithProviders type, for example here, it should be ModuleWithProviders<NgxsModule>, see docs for ModuleWithProviders type here.
Please try to update all usages of the ModuleWithProviders type in your project, try to compile it with Ivy again and let us know if that resolved the problem. Note: this change is also compatible with View Engine.
@arturovt thanks, that does indeed reproduce the issue you describe for store.NgxsModule.forFeature([RouterState]). I marked #32619 as WIP for now and look into the UMD issue tomorrow, so that we can hopefully resolve both issues with that PR.
@arturovt there was indeed an issue with resolving store.NgxsModule.forFeature([RouterState]) in both CommonJS and UMD bundles, for which I included a fix in #32619. With those fixes, the compilation no longer fails :-)
Reacted by Adam Wamai Egesa, Daniel Schuba, keenanwl and Jakub Tomek
Hi @JoostK. Still getting this error after updating package.json with angular 8.2.6. Any suggestions?
Compiling @ngxs/router-plugin : main as umd
Value at position 0 in the NgModule.imports of NgxsRouterPluginModule is not a reference: [object Object]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nam-client@0.0.0 postinstall: `ivy-ngcc`
Activity
markwhitfeld commentedon Jul 23, 2019
Just to add in here, I have just tested this repo with Angular 8.2.0-next.2 and it has the same build failures.
In the referenced firebase issue it was suggested that this would be fixed by PR #30591 but this PR seems to have been merged, closed (although there seem to be more subsequent commits on it?) and is part of the Angular 8.2.0-next.2 package. The issue is unfortunately still present in this version.
splincode commentedon Aug 25, 2019
@alxhub @AndrewKushnir Angular 9.beta + NGXS works now, but
@ngxs/router-pluginnot working with Ivyfor reproduction
app.module.ts
app.state.ts
store-ivy.module.ts
Build successful, but runtime error after
ng serveBut works with Angular 7, 8 with ViewEngine
tahmid-shahriar commentedon Sep 4, 2019
I have the same problem with --enable-ivy on, NgxsRouterPluginModule does not work, gives me the same error, rests are okay
arturovt commentedon Sep 5, 2019
@alxhub @AndrewKushnir
FYI I've updated Angular version to the
9.0.0-next.5in this repro.It's built without errors but still there is a runtime error
Can't resolve all parameters for RouterState: (?, ?, ?, ?, ?, ?, ?)..When running
ivy-ngcc, it fails whenCompiling @ngxs/router-plugin : main as umdwith:Also I've noticed that it fails with
Can't resolve all parameters for RouterStatebecause there is nongInjectableDefand if I add it manually, then in works:AndrewKushnir commentedon Sep 6, 2019
Hi @arturovt,
Thanks for additional information. I've looked at the code and it seems like the issue appears because there is insufficient type information provided when you use
ModuleWithProviderstype, for example here, it should beModuleWithProviders<NgxsModule>, see docs forModuleWithProviderstype here.Please try to update all usages of the
ModuleWithProviderstype in your project, try to compile it with Ivy again and let us know if that resolved the problem. Note: this change is also compatible with View Engine.Thank you.
6 remaining items
JoostK commentedon Sep 11, 2019
@arturovt thanks, that does indeed reproduce the issue you describe for
store.NgxsModule.forFeature([RouterState]). I marked #32619 as WIP for now and look into the UMD issue tomorrow, so that we can hopefully resolve both issues with that PR.fix(ngcc): correctly read static properties for aliased classes
fix(ngcc): resolve imports in `.d.ts` files for UMD/CommonJS bundles
JoostK commentedon Sep 12, 2019
@arturovt there was indeed an issue with resolving
store.NgxsModule.forFeature([RouterState])in both CommonJS and UMD bundles, for which I included a fix in #32619. With those fixes, the compilation no longer fails :-)arturovt commentedon Sep 12, 2019
@JoostK great, dank je wel :)
fix(ngcc): resolve imports in `.d.ts` files for UMD/CommonJS bundles (#…
crywolfe commentedon Sep 13, 2019
Hi @JoostK. Still getting this error after updating package.json with angular 8.2.6. Any suggestions?
arturovt commentedon Sep 13, 2019
@crywolfe check their changelog, they haven't published anything for the last 2 days ;)
jtomek commentedon Sep 16, 2019
FYI, NGXS team has not checked the fix yet because they're waiting for the a new version of the compiler to be published. Ref: ngxs/store#1165
angular-automatic-lock-bot commentedon Oct 17, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.