-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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 #13
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 |
@jasonwaters Sorry for the delay, glad you worked it out! 👍 |
@jasonwaters could you show your working code please? :) |
@mxii no problem. It's basically this bit from the code I linked to:
|
But where to put this part |
@mxii oh, right. actually my productionReducer and developmentReducer look like this:
hope it helps |
Great, thanks! |
@jasonwaters I am getting this error Exception: Call to Node module failed with error: Prerendering failed because of error: ReferenceError: localStorage is not defined I don't see what you are using for the localStorage argument? I believe that is why this is failing. |
@jrmcdona where are you seeing this error? It looks like you are trying to execute the code within node? Node does not have a native localStorage implementation, you could consider using a shim such as node-localstorage. |
I am seeing the error in my Angular / .NET Core MVC app when running locally. Perhaps that is the issue, because of node. I will try node-localstorage and see how that goes. Tried this but it failed to install and isn't maintained. |
I believe this is worth sharing ngrx/platform#306 - it suggests to use |
Hi! 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:
if I change it to this...
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:
Do you have any ideas?
The text was updated successfully, but these errors were encountered: