ngrx-data-lab icon indicating copy to clipboard operation
ngrx-data-lab copied to clipboard

Error when starting up app on step 7

Open brane53 opened this issue 7 years ago • 4 comments

I went through all the steps in the quickstart guide but got an error when I ran step 7. I went back through and realized the guide didn't have a step for importing the AppStoreModule into the AppModule. It's a pretty simple thing to overlook, and once I did that everything worked fine.

brane53 avatar Nov 30 '18 22:11 brane53

Same here. importing AppStoreModule in app.module.ts resolved the following error:

ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppDevModule)[HeroService -> EntityCollectionServiceElementsFactory]: StaticInjectorError(Platform: core)[HeroService -> EntityCollectionServiceElementsFactory]: NullInjectorError: No provider for EntityCollectionServiceElementsFactory! Error: StaticInjectorError(AppDevModule)[HeroService -> EntityCollectionServiceElementsFactory]: StaticInjectorError(Platform: core)[HeroService -> EntityCollectionServiceElementsFactory]: NullInjectorError: No provider for EntityCollectionServiceElementsFactory! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:717) at resolveToken (core.js:954) at tryResolveToken (core.js:898) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:795) at resolveToken (core.js:954) at tryResolveToken (core.js:898) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:795) at resolveNgModuleDep (core.js:17739) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:18428) at resolveNgModuleDep (core.js:17739) at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:717) at resolveToken (core.js:954) at tryResolveToken (core.js:898) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:795) at resolveToken (core.js:954) at tryResolveToken (core.js:898) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:795) at resolveNgModuleDep (core.js:17739) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:18428) at resolveNgModuleDep (core.js:17739) at resolvePromise (zone.js:814) at resolvePromise (zone.js:771) at zone.js:873 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:14134) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188) at drainMicroTaskQueue (zone.js:595)

huddlestonka avatar Dec 05 '18 17:12 huddlestonka

Please note this was also asked and closed in Issue 25: https://github.com/johnpapa/ngrx-data-lab/issues/27

alekline avatar Dec 11 '18 18:12 alekline

With @angular/cli v7, do we need to use this to create the App Store Module? (notice the = used to specify the module to import in)

ng g m store/app-store --flat -m=app --spec false

Worked for me.

mj-interactive avatar Dec 29 '18 20:12 mj-interactive

Don't forget to import NgrxDataModule.forRoot(entityConfig) in AppStoreModule (store/app-store.module.ts) and import AppStoreModule in app.module.ts

lhaisrs avatar Mar 20 '19 15:03 lhaisrs