I was getting the following error using electron forge, on a Mac, only when the app was packaged, but not when using yarn start.
asked for js but it was not precompiled!
None of the search results I found seemed relevant to my issue, it was mostly through using require() and on html/css files. Mine, however, was a JavaScript module.
Check the casing on your imports, make sure it matches the file's casing.
I was using a capitalized path, but the file was lowercase (rendererThreadSignaler.js).