Writer field issue DOMDocument not found on php 8.1

I’ve got this writer field error only on my digital ocean server, locally all is fine. All other extension are installed (mb_string, php xml, curl)

Any idea?

yml

name: Header
icon: title
preview: fields
wysiwyg: true
fields:
  title:
    type: text
  intro:
    type: writer

What about php-dom?

php-dom is installed too. Just realized on my other DO droplet it works. But I can’t figure out the difference. Only main php is 7.4 where it works and 8.1 where it doesn’t. Does the extensions version matter?

Yes! Must be in line with your php version.

Do the modules actually show up as enabled in phpinfo?

Yes they showing up as enabled. I don’t know what’s the issue. Anyways I downgraded the server to php 7.4 incl. extension and now all is fine. Hope that helps someone with the same issue.