[AOT] ngc: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule
See original GitHub issueHi! I recently upgraded to the 2.0.0 release version of Angular 2. I’m getting this error from ngc:
ngc: Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule
I believe it has to do with this code in the NgModule definition:
StoreModule.provideStore(
compose(
localStorageSync(['todos']),
combineReducers
)({todos, visibilityFilter})
if I change it to this…
StoreModule.provideStore({todos, visibilityFilter})
it works fine. If I attempt to do what the error says, and replace the function with a reference to an exported function it still does not work:
import { Store, StoreModule } from '@ngrx/store';
import { todos, visibilityFilter } from './reducers';
import { NgModule } from '@angular/core'
export const reducers = compose(
localStorageSync(['todos']),
combineReducers
)({todos, visibilityFilter});
@NgModule({
imports: [
BrowserModule,
StoreModule.provideStore(reducers)
]
})
export class MyAppModule {}
Do you have any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
ERROR in Error encountered resolving symbol values ...
Calling function 'PerfectScrollbarModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function ...
Read more >Error encountered resolving symbol values statically. Function ...
Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda? Ask Question.
Read more >Do you know how Angular transforms your code? - Medium
Error : Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to ......
Read more >Ngc error due to resolving symbol values statically (rc0)
The error is coming from the use of IonicModule.ForRoot it seems. As a result, I'm not sure where to go from here. Can...
Read more >AOT metadata errors - Angular
Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function. The compiler does not currently...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Never mind, here’s how the ngrx example app works around it:
https://github.com/ngrx/example-app/blob/master/src/app/reducers/index.ts#L82
@mxii oh, right. actually my productionReducer and developmentReducer look like this:
hope it helps