-
Notifications
You must be signed in to change notification settings - Fork 755
Errors on prerender #537
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
Comments
It's trying to call |
Yes, I restarted my dev server after changing After a while, I get the same error |
Very strange that this is happening during That means that this error is happening when the files are first loaded. Usually, Are you using JSX outside of component definition ReactDOM.render(<Something />, targetElement) ? Hmmm... but even then... why would React be undefined? Anyhow, I think there's something going wrong while it loads The best suggestion I can make is "bisect" to find the error: Remove half of the If you remove all the Or, if you can share your |
I am writing my components in jsx files, most of which use the es6 syntax; they are being transpiled correctly. Working through the components.js file, I have removed assumed dependencies and added d3.min to the list of files needed to precompile. The error has changed to It would seem that loading d3, react-server, and components does not expose a global React for the instances of the components. components.js
the last file being semi-static data used by most of the components |
will all the changes, I revert to attempt to load a stateless component server side and get the createElement ReferenceError. |
@rmosolgo I am attempting the workaround you proposed in #443 Now I get
|
Any update here? |
@franciscoGPS do you have any details or reproduction steps. I was going to close the issue as it's old but your comment is more recent. |
I have a rails app that I am attempting to use server render react components with. I am able to use the react_component helper in all cases except prerender, where I get
TypeError: Cannot read property 'createElement' of undefined
I have installed the latest react-rails gem, configured the application
set up components.js to point to all my component folders. when I {:prerender => true} it breaks.
full trace below
The text was updated successfully, but these errors were encountered: