Reputation: 1145
I added reducers to my angular2 project like this:
const rootReducer = compose(storeLogger(), combineReducers)({
toolbar: toolbarReducer
});
imports: [
...,
StoreModule.provideStore(rootReducer)
],
It's working correctly, but when I try to deploy it to github-pages
ng github-pages:deploy
Then I end up with the following error:
ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 12:42 in the original .ts file), resolving symbol compose in /Users/gkucmierz/learn/coin-tools/node_modules/@ngrx/core/compose.d.ts, resolving symbol AppModule in /Users/gkucmierz/learn/coin-tools/src/app/app.module.ts, resolving symbol AppModule in /Users/gkucmierz/learn/coin-tools/src/app/app.module.ts, resolving symbol AppModule in /Users/gkucmierz/learn/coin-tools/src/app/app.module.ts, resolving symbol AppModule in /Users/gkucmierz/learn/coin-tools/src/app/app.module.ts, resolving symbol AppModule in /Users/gkucmierz/learn/coin-tools/src/app/app.module.ts
What am I doing wrong?
Upvotes: 0
Views: 164
Reputation: 261
The error message is pretty clear.
You have to make your code statically analyzable for AoT.
This error has nothing to do with github pages.
This builds your code in JIT mode: ng build
And this in AOT mode: ng build --aot
The github-pages:deploy
command was doing AOT builds.
Upvotes: 1