spatie / server-side-rendering

Server side rendering JavaScript in a PHP application
https://sebastiandedeyne.com/posts/2018/server-side-rendering-javascript-from-php
MIT License
602 stars 34 forks source link

ArgumentCountError: Too few arguments to function Spatie\Ssr\Engines\V8::__construct() #32

Closed kawaljeet-singh-monotype closed 4 years ago

freekmurze commented 4 years ago

There’s too little info on how to recreate this. Tests are running fine.

realrecordzLab commented 3 years ago

I have the same problem with this code

<?php 
/* vue browser extension ssr test */
require_once __DIR__."/vendor/autoload.php";

use Spatie\Ssr\Renderer;
use Spatie\Ssr\Engines\V8;

$engine = new V8();

$renderer = new Renderer($engine);

echo $renderer
    ->entry(__DIR__."/js/main.js")
    ->render();

?>
akrys commented 3 years ago

More Info here: https://stackoverflow.com/questions/64012527/fatal-error-uncaught-argumentcounterror-too-few-arguments-to-function-spatie-s/64012969

pixobit commented 3 years ago

The error is obvious, their documentation is misleading though