Angular “功能名称”;siteContext“;状态中不存在,因此createFeatureSelector无法访问它

Angular “功能名称”;siteContext“;状态中不存在,因此createFeatureSelector无法访问它,angular,ngrx,spartacus-storefront,Angular,Ngrx,Spartacus Storefront,是否可以修复/避免以下警告 store.js:607 The feature name "siteContext" does not exist in the state, therefore createFeatureSelector cannot access it. Be sure it is imported in a loaded module using StoreModule.forRoot('siteContext', ...) or StoreModule.forFea

是否可以修复/避免以下警告

store.js:607 The feature name "siteContext" does not exist in the state, 
therefore createFeatureSelector cannot access it.  Be sure it is 
imported in a loaded module using StoreModule.forRoot('siteContext', 
...) or StoreModule.forFeature('siteContext', ...).  If the default 
state is intended to be undefined, as is the case with router state, 
this development-only warning message can be ignored.
我看到createFeatureSelector(featureName)存储函数被多次调用。第一次调用的状态未以“siteContext”作为功能名称初始化,因此警告消息将显示在控制台上(仅在开发模式下)


我使用的是spartacus/core和spartacus/storefront的1.2.1版。您是否在任何服务的构造函数中使用站点上下文的状态(语言、货币或基本站点)?如果是,您能否稍后尝试使用它(即,在稍后调用的某些方法中)?2.您是否定制了与站点上下文相关的斯巴达克斯服务?谢谢您的帮助!1.我们在两个服务的构造函数中使用LanguageService和CurrencyService,在组件的构造函数中也使用CurrencyService。我们有一个定制的日期服务,在整个应用程序中广泛使用,它在构造函数中注入LanguageService,并订阅getActive()observate以获取区域设置。我将调查是否有可能推迟服务初始化。2.我没有发现Spartacus站点上下文相关服务的任何定制。为了进行测试,我从所有在其构造函数中使用它们的服务/组件中完全删除了LanguageService和Currency service,但我仍然看到警告。此外,它可能会有所帮助:在Redux检查器中,我可以看到siteContext状态在@ngrx/store/init操作之后得到初始化,其中存在未初始化的siteContext对象(默认为null值)。