The error is caused by the module CKEditor Anchor Link:
/modules/contrib/anchor_link/src/Plugin/CKEditorPlugin/AnchorLink.php
/**
* Get the CKEditor Link library path.
*/
protected function getLibraryPath() {
// Following the logic in Drupal 8.9.x and Drupal 9.x
// ---------------------------------------------
// Issue #3096648: Add support for third party libraries in site specific
// and install profile specific libraries folders
// https://www.drupal.org/project/drupal/issues/3096648
//
// https://git.drupalcode.org/project/drupal/commit/1edf15f
// ---------------------------------------------
// Search sites/<domain>/*.
$directories[] = \Drupal::getContainer()->getParameter('site.path') . "/libraries/";
The last line listed works only in Drupal >=9.
You will find an increasing number of modules switching to Drupal 9/10 because Drupal 8 is no longer supported. The only issue here is that the module is still marked as Works with Drupal: ^8 || ^9 || ^10
.
You either need to upgrade to Drupal 9 (recommended) or downgrade the module.
As a quick fix, until you find time to upgrade to Drupal 9, you can patch this code line to work with Drupal 8:
$directories[] = \Drupal::service('site.path') . "/libraries/";