-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
When prerender is enabled the generated code fails with a TypeError #246
Comments
There's a problem with server rendering. Not sure what it might be. I'll take a look tonight. |
@sigmike Can you please try 2.01. or 2.0.0 of react-on-rails from npm and see if that solves the issue. Thanks. |
I changed react-on-rails to 2.0.1 in client/package.json, ran npm install, restarted the server and I get the same error. |
I got this too; I tried 2.2.0 and 2.0.0 as well and it's still the same error. I was trying to trace this down but can't find out what it may be.. |
This is probably happening only for server rendering. I appreciate any help getting this tracked down. |
I'm updating a branch code that now allows tracking this down much more easily! Please pull the code here. To repro:
Then visit: http://localhost:3000/server_side_hello_world
|
Pushing polyfill shortly |
Fixed in 2.3.0 and #244. See https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md. |
Possible that this is back in 5.2.0? I am seeing the same issue but I have been pulling in the css module/webpack hot reload refactoring so my install isn't pure. https://github.com/pherris/react-on-rails-novu/compare/server-rendering?expand=1 The exception seems to be coming from this line: https://github.com/pherris/react-on-rails-novu/blob/17256445fd664d56ed0c7c58f12fe7617edb9460/client/app/bundles/HelloWorld/store/helloWorldStore.jsx#L21
in the console:
started with in this case
|
Isolated it to the |
@pherris Was this issue ever resolved for you? |
I've got the same problem, so maybe we can reopen this issue. I also get this error when trying to use a prerendered component: This happens every time i use |
@dpuscher You'll have to debug this. Feel free to open a PR if you see a fix or post more info in a new issue. |
Just in case anyone will stumble upon this problem in the future: |
I created a new Rails 4 app, added react_on_rails and ran the generator with
--redux --server-rendering --ruby-linters
and when I start the server withnpm run rails-server
and accesshttp://localhost:3000/hello_world
I get this error:The generated app is here: https://github.com/sigmike/test_react_on_rails/tree/prerender_fail
The text was updated successfully, but these errors were encountered: