when attaching library via template makes full template markup disappear make sure all files referenced by library exist

{{ attach_library(‘cyborgtranslate/switcher’) }}

Hadn’t made the JavaScript file yet, and it all disappeared rather than output an error, even in the logs.

Even an empty file will fix this, so even if you do not have any JavaScript for your library yet, create a blank file at the location you specified in your .libraries.yml anyway.

The otherwise-good documentation at

https://www.drupal.org/docs/develop/creating-modules/adding-assets-css-js-to-a-drupal-module-via-librariesyml

and

https://www.drupal.org/docs/develop/theming-drupal/adding-assets-css-js-to-a-drupal-theme-via-librariesyml

won’t warn you about that.