-
Notifications
You must be signed in to change notification settings - Fork 50
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
serverRenderer is not a function #75
Comments
@jinxin479 you're going to have to provide a bit more information than that -- it's likely an issue with your configuration, see https://github.com/60frames/webpack-hot-server-middleware/search?q=serverRenderer+is+not+a+function&type=Issues |
sorry I found this error maybe caused by react-universal-component. this repo does not support webpack 4 so far. |
Both react-universal-component and webpack-hot-server-middleware can work with Webpack 4. However, this issue can get in the way: The "serverRenderer is not a function" error happens most often because the real error is swallowed on one of these two lines: In the case of async code splitting - any code splitting, not just react-universal-component - that Webpack issue can leave you with a chunk name based off an async chunk rather than your entry point. So, with an entry name of "server" and an I'm attempting to put together a PR to provide friendly error reporting when something fails on these two lines. Took me the better part of an hour to figure out what was going on here. |
thank you ! I think I got it.. |
i got the same issues Environment
My RepositoryThe code that i think caused this problemserver/index.js
i have an issue with the development mode when i open my app in browser, it said serverRenderer is not a function, everything is okay with production mode |
I had to set |
Started having the same error after upgrade to webpack 4. And I don't even have async chunks. |
@nemixe did you solve your issue? |
None of the above solved this error when dealing with router AFTER whsm and BEFORE app listen (express). webpack-contrib/webpack-hot-middleware#26 (comment) this is where you can get error. changed order to so now the flow has to be but event then its kinda working but it is not. |
in the webpack config for the server your entry point should be string:
You should change output.filename if your are using [name] computed property. |
environment :
error
The text was updated successfully, but these errors were encountered: