Failed to fetch dynamically imported module

SOLVED IT:

The problem was that one of the two files that exist in the root javascript (app/javascript) folder was importing another through relative importing.

Solve it by importing it the correct way (not using relative import).