store icon indicating copy to clipboard operation
store copied to clipboard

LoggerPluginModule giving error

Open tsawan opened this issue 8 years ago • 7 comments

I am trying to use LoggerPluginModule and it works ok as long as I have a single store. Once I add a 2nd store, I start getting the following error (Windows, Angular 5) in both Chrome and IE. Here I've added a second store "WellStore" and it's giving error.

image001

tsawan avatar Mar 14 '18 17:03 tsawan

Can you make a stackblitz demo? Would be really helpful for us

amcdnl avatar Mar 14 '18 18:03 amcdnl

LoggerPluginModule fails for me as well, but in another way.

TypeError: Cannot read property 'app' of undefined
    at StoreFactory.invokeEvents (ngxs-api.js:200)
    at Ngxs._dispatch (ngxs-api.js:326)
    at Ngxs.dispatch (ngxs-api.js:311)

app.modules.ts config looks like this:

NgxsModule.forRoot([AppStore]),
ReduxDevtoolsPluginModule.forRoot({ disabled: isProduction }),
LocalStoragePluginModule.forRoot({
	key: STORAGE_KEY_NGXS_STORE,
	serialize: JSON.stringify,
	strategy: StorageStrategy.sessionStorage,
	deserialize: JSON.parse,
}),
LoggerPluginModule.forRoot({
	logger: console,
	collapsed: true,
}),

perjansson avatar Mar 14 '18 21:03 perjansson

@amcdnl unfortunately none of jsfiddle or stackblitz work on my office workstation. I tried to move files around and was also getting the bug mentioned by @perjansson above. Not sure if could only be on windows environment as I tried somewhat similar code on osx and it worked ok.

tsawan avatar Mar 16 '18 15:03 tsawan

I think this is the same as #71

amcdnl avatar Mar 16 '18 18:03 amcdnl

@tsawan can you see if you have the same error when using 2.0?

deebloo avatar Mar 17 '18 20:03 deebloo

@deebloo This is fixed in 2.0. Excellent work.

tsawan avatar Mar 18 '18 06:03 tsawan

horay!

deebloo avatar Mar 18 '18 12:03 deebloo