-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Get "Cannot read property 'prototype' of undefined" error with SSR #971
Comments
Cannot reproduce the error. |
Sad news 😞 I don't know, will I have a time to create simple test example. I used I detected three problems, which are described in this issue, #966 and in #549. They prevent me from using |
The problem with |
@railsme @gambala the use of the webpacker binstubs and webpacker default configuration is loaded with gotchas and the obfuscations of having the main code being in the NPM library for webpacker. You may want to consider a setup similar to https://github.com/shakacode/react-webpack-rails-tutorial. |
I'm getting the same error. I started my demo application by following the shakacode tutorial mentioned by @justin808. The gem versions are similar to @gambala. Everything works fine unless I try to prerender. Can't use bin/webpack -w -- error: Unknown switches '-w'.
|
@cagedartist Please don't use the webpacker setup if you want to do server side rendering (pre-render). As of a few months ago, webpacker was NOT setup to do SSR. @cagedartist @railsme @gambala Any chance that one of you can give us a doc PR? |
Thanks, @justin808 -- Glad to know it's not something I did wrong. |
@cagedartist Also, be sure to update to the latest version 10.0.1. |
|
@vasilakisfil don't forget to cleanup public/packs directory from time to time :) @justin808 I will check what the difference between configurations. |
v10.0.1 (both gem and yarn).
app/views/molly/welcome/index.slim
TestBlock.jsx
ssr.js
packreact_on_rails.rb
Stacktrace:
The text was updated successfully, but these errors were encountered: