-
Notifications
You must be signed in to change notification settings - Fork 53
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
Using V8js(2.1.0) (with v8 6.4.388.41) on ReactBundle 2.1.0 throw error (while trying snapshooting ?) #29
Comments
Hi, there. I'm dealing with the same issue when using Limenius/ReactBundle to do SSR with my Symfony 4 + Create React App.
Here's some info :
The index.js looks like this import ReactOnRails from 'react-on-rails';
import App from './App';
ReactOnRails.register({ App }); And App.jsx import React from 'react';
function App() {
return <h1>Hello, world!</h1>;
}
export default App; Do you need more info to solve this issue ? |
As a workaround, how do you force phpexecjs to use node cli instaed of v8js? I can't figure out how to configure this. |
as i'm using docker i just use a image without v8js enabled, but you can aslo disable v8js from php extension config, normaly reactRenderer autodectect if v8js is enabled and use node if not (node should be installed) if none are installed phpExecJs throw a error |
For me the problem came from Create-React-App's hot reloading module injection. I fixed it by commenting out this line in config/webpack.config.dev.js in my react project (ejected):
I also had issues trying to import css files directly in my react app, through |
For reference I had this same issue. I narrowed it down to To fix I moved babel-polyfill to the webpack entrypoint so it was only on the client side where it is needed. Using encore
|
look like remove babel-polyfill from serverside config solved my prob too :) @nacmartin could you precise this somewhere on doc or/and maybe remove your babel-polyfill from the symfony react sandbox serverside config ? in case you dont faced this prob with v8js and babel-polyfill can you tell us wich v8 version you use ? ^^ |
I've got the same problem and it seems it's not affected by the babel configuration inside webpack. I'll keep digging and keep you updated. Edit: Oh Okay... didn't get it on first thought. So, the solution really seems to be: |
Quick debugging tip: Do |
as title say, i get an error here is the stack trace from php-fpm
you can saw the v8 source code who throw the error here https://github.com/v8/v8/blob/6.4.388/src/snapshot/startup-serializer.cc at line 125
note that i revert back my reactBundle version to 0.14.1 and my app now work well with v8js, but note that the react_render_array isnt present in 0.14.1 :(
i also tryed to run the symfony_react_sandbox on sf 4 who also use 2.1.0 and the same error is throw
the symfony_react_sandbox on sf 3 use ReactBundle 0.14.1 and working well
if you have a specific version of V8 for using 2.1.0 plz ignore this issue and describe it on doc 👍
note that i cant really test all v8 version as this take something like an hour to compile my V8js on my docker
The text was updated successfully, but these errors were encountered: