Open floodedcodeboy opened 6 years ago
Hey,
With V8Js you'll need to use the print
method otherwise render
will always return undefined. Perhaps try $v8->executeString('print("test");')
?
If you still can't figure it out, link me to your code repo and I'll see if I can debug it.
Hey, sorry I've just seen this.
I'll give the print method a try.. but that said; I've used the code from your tutorial.
I'll update you on my findings.
Thanks!
Hi,
So your tutorial came around at a great time, thank you for putting it together and sharing. ! I'm busy working on a project that requires SSR and Laravel and I'm not that wet behind the ears when it comes to SSR.
I have followed your tutorial to the "tee", making only slight adjustments here and there for paths (which I've been very careful to double check to make sure they're not the source of this issue) . I've installed V8 and V8js successfully (this was probably the most tiresome part).
The issue that I'm having is this inside the
AppController.php
when I call$this->render()
it returns'undefined'
which is not what I was expecting.I've been over your tutorial at least ten times - checking all my files making sure they match up with yours, making sure that
entry-client.js
andentry-server.js
can both be read (they can) and I still can't see why this is happening... I've tried other things inside therender()
function and can confirm that v8js does work! ... I wonder... might you have any ideas?I'm not sure that this helps, but something else I tried was removing the following lines from the `render()' function :
leaving only:
and then outputting that in the
get()
function which again returned'undefined'
.I'm completely out of ideas. Any help would be massively appreciated. Thanks in advance.