Server side rendering fails with identifier 'Set' undefined
See original GitHub issueSteps to reproduce
- Make any old component
- Set prerender to true
- Try to render the component
Expected behavior
It should pre-render the component.
Actual behavior
Execjs crashes with the following error:
ExecJS::ProgramError (identifier 'Set' undefined):
(execjs):1
app/controllers/entry_point_controller.rb:3:in `index'
System configuration
Sprockets or Webpacker version: webpacker (3.5.5) React-Rails version: react-rails (2.4.7) React_UJS version: “react_ujs”: “^2.4.4” Rails version: rails (5.2.1) Ruby version: RUBY VERSION: 2.4.4 (2018-03-28 patchlevel 296) [i386-mingw32]
Basically everything works perfectly fine, but if I attempt to use server-side rendering, the program crashes with the above error: identifier 'Set' undefined
. I thought it might have been due to an outdated, but I updated to the latest node and the issue persists.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
how to properly deal with window=undefined error in react ...
i'm getting the error because for some reason. the server is also looking at window.__INITIAL_STATE__ as well. So the problem is i cannot...
Read more >Angular Universal: Complete Practical Guide
This post will be a complete practical guide for getting started with Angular Universal. We are going to go start with an existing...
Read more >Is an undefined actually undefined? - JavaScript in Plain English
TL;DR undefined is not a restricted keyword so we can name by mistake our variable “undefined” and set a value to it which...
Read more >Implementing SSR in Next.js: Dynamic routing and prefetching
Server -side rendering (SSR) has become a widely adopted technique to enhance the performance and SEO of web applications. And while static site ......
Read more >Call JavaScript functions from .NET methods in ASP.NET Core ...
In Blazor Server apps, JavaScript (JS) interop may fail due to networking ... When SignalR server-side logging is set to Debug or Trace, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OH! You’re using your system NodeJS Do
bundle add mini_racer
and it will start working for you.Execjs
automatically loads system JS runtime, which is Chakra on Windows, JSCore on OSX, and usually NodeJS if available. We only support Node > 6 (I think, It’s whichever one added ES6 and the new JSX features), therefore we do not supporttherubyracer
as it’s using libv8-v3 which is far too old.Upgrade your node to > 6, or include
mini_racer
.@rahulakurati Glad that solved it for you.