-
Notifications
You must be signed in to change notification settings - Fork 756
SSR (Server Side Rendering) with Shakapacker #1201
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
Maybe I should ask in another way. Does anyone have SSR working with Shakapacker? If so, could you provide a minimal project showing this? |
Did you try with other versions of this gem? If that is new project where you need this and noone helps to resolve, consider to use different tools. Future where rails is going with assets |
I tried a few variations of what you just gave, but it doesn't work for me :/ Unfortunately, it's not a new project, so using different tools is not an option. |
@paul-mesnilgrente I will try to reproduce this issue on my local. |
I was able to reproduce this issue locally. I am still trying to identify the root cause and fix the problem. |
I will be on leave from today till 16th October. I will debug this once I am back. |
@paul-mesnilgrente looks like I suggest adding a log statement right under
|
@Judahmeek and @alkesh26, and @ahangarha, I caution about spending too much time on this sample repo, as it's likely a configuration issue with the old version We should try a fresh install of the @paul-mesnilgrente can you try my suggestions ^^^? Also, I encourage you to join our slack @BookOfGreg it would really help if I can release a beta version ASAP! See #1208. |
I don't know if this will be any help, but I'm currently trying to switch a project from Webpacker to just Webpack, and getting the same error in this issue. I wouldn't be surprised if this isn't (or isn't going to be) supported, but I'm just chiming in in case it's a matter of the output not being the same. Echoing what was said earlier, it appears that |
@tegandbiscuits Should we release an NPM package with UJS. For your use case, would react_on_rails work better? |
@ahangarha can you take a look? |
I try to explore this since this is blocking 2.7 release. |
@justin808 I tried a fresh install with the following versions:
I get the same error. |
This is the main blocking issue for 2.7. @ahangarha can you add a new Rails 7 app inside of the /spec folder and let’s use that to demonstrate that SSR works. |
@justin808 I have tried this here but didn't get any success. |
SSR works now in that repo with my changes, which incorporate #1252 as well |
@Judahmeek I still have the error using the dummy app, as well as on my other app (using #1252 ). |
What error? You'll have to provide specifics of what you did & what error you're getting. |
The error I am getting using this branch is :
|
Having the same error |
Please check out SSR section in the documentation:
Please follow the documentation and confirm the fix. If you are just starting to use react-rails, take a look at react_on_rails which offer more features. |
Steps to reproduce
yarn
andbundle install
bin/rails server
andbin/webpacker-dev-server
Expected behavior
I expect the app to show a nice "Hello Gus!"
Actual behavior
The page errors
System configuration
Shakapacker version: 6.5.0
React-Rails version: 2.6.2
Rect_UJS version: 2.6.2
Rails version: 7.0.3.1
Ruby version:3.0.3
You can test this with the repo mentioned above. Do you know what's wrong? The error doesn't leave a lot of clues.
The text was updated successfully, but these errors were encountered: