In my case I forgot js modules initialized inside base template, while page-specific js-related imports was at the bottom of html's head.
importmap should be above any javascript module imports. Rearranging head imports solved the issue in my case.