Skip to content
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

Webpack Compilation Error - Function calls are not supported #8

Open
hopkinsjj9 opened this issue Jun 26, 2017 · 4 comments
Open

Webpack Compilation Error - Function calls are not supported #8

hopkinsjj9 opened this issue Jun 26, 2017 · 4 comments

Comments

@hopkinsjj9
Copy link

hopkinsjj9 commented Jun 26, 2017

I've tried uninstalling/reinstalling ngrx/core and angularfire2 without success.

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 C:/Users/Jack/Documents/ang2/ngrx-course-master/node_modules/@ngrx/core/compose.d.ts,
resolving symbol reducer in C:/Users/Jack/Documents/ang2/ngrx-course-master/src/app/reducer.ts,
resolving symbol reducer in C:/Users/Jack/Documents/ang2/ngrx-course-master/src/app/reducer.ts,
resolving symbol reducer in C:/Users/Jack/Documents/ang2/ngrx-course-master/src/app/reducer.ts,
resolving symbol AppModule in C:/Users/Jack/Documents/ang2/ngrx-course-master/src/app/app.module.ts,
resolving symbol AppModule in C:/Users/Jack/Documents/ang2/ngrx-course-master/src/app/app.module.ts,
resolving symbol AppModule in C:/Users/Jack/Documents/ang2/ngrx-course-master/src/app/app.module.ts
webpack: Failed to compile.

angular/cli: 1.0.0
node: 8.0.0
os: win32 x64
angular/common: 4.2.4
angular/compiler: 4.2.4
angular/core: 4.2.4
angular/forms: 4.2.4
angular/http: 4.2.4
angular/platform-browser: 4.2.4
angular/platform-browser-dynamic: 4.2.4
angular/router: 4.2.4
angular/cli: 1.0.0
angular/compiler-cli: 4.2.4

@hopkinsjj9
Copy link
Author

I was able to backout the compose/store-freeze functionality in reducer.ts and compiled successfully.

//import {compose} from "@ngrx/core/compose";
//import {storeFreeze} from "ngrx-store-freeze";
....

export const reducer =
combineReducers({uiState,storeData, router: routerReducer});

Obviously, that's not the real solution. How can we get this functionality to work?

@hopkinsjj9
Copy link
Author

Without changing any code a recompile failed. This time on combineReducers. (see above)
No idea what's going on here

@Alucardz
Copy link

Alucardz commented Aug 5, 2017

In src\app\reducer.ts

Try replacing:

//old code
//export const reducer = compose(storeFreeze, combineReducers)({uiState,storeData, router: routerReducer});

//new code
export function reducer(state, action) {
    return compose(storeFreeze, combineReducers)({ uiState, storeData, router: routerReducer })(state, action);
}

@hopkinsjj9
Copy link
Author

Many thanks Alucardz.
I will try using your suggestion. Hopefully, I can get the compose/store-freeze functionality working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants