Why isn't this module library loaded?
Switch the active theme to a core theme. If the library loads now then make sure that your custom theme has &lt;js-bottom-placeholder token="{{ placeholder_token }}"&gt; and  &lt;js-placeholder token="{{ placeholder_token }}"&gt; in the html.html.twig template.

Another pitfall is an incorrect reference to the library. Although it does not apply to the original question I'll state it anyway because it solved the problem for me. If your my_module.libraries.yml looks like this

my_libraries.my-library:
  js: ...


then you have to use 

['#attached']['library'][] = ['my_module/my_libraries.my-library']


instead of 

['#attached']['library'][] = ['my_libraries.my-library']