aerni / statamic-advanced-seo

Comprehensive SEO addon for Statamic with flexibility in mind
https://statamic.com/addons/aerni/advanced-seo
10 stars 5 forks source link

Browsershot Error When Generating SEO Images #105

Closed owuraku closed 8 months ago

owuraku commented 8 months ago

I am running into an error when I try to generate seo images on production server.

The error is :

/var/www/html/vendor/spatie/browsershot/bin/browser.cjs:373
            await page.waitForSelector(request.options.waitForSelector, request.options.waitForSelectorOptions ?? undefined);

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47

I am running : _Laravel v10.30 Statamic CMS v4.31.0 Advanced SEO v2.3.0

Puppeteer@21.5.0 Node v18.17.1 NPM v9.6.7_

aerni commented 8 months ago

I'm going to need more information to debug this. Can you reproduce this on a fresh installation?

Puppeteer is quite fragile and it most likely has nothing to do with Advanced SEO. It's probably best to raise this issue in the Browsershot repo. Advanced SEO is using Browsershot to generate the images. Nothing fancy going on here.

owuraku commented 8 months ago

Yes, it is a new installation. I will visit their repo and try to find a solution