web icon indicating copy to clipboard operation
web copied to clipboard

[web-test-runner] "Failed to fetch dynamically imported module" after silent dev-server-esbuild fail

Open mkczarkowski opened this issue 2 years ago • 0 comments

Currently when you use dev-server-esbuild to transpile files, web-test-runner doesn't display errors that occurs during the transpilation process. The only feedback that you get is:

test/specs/autocomplete.spec.ts:

 🚧 Browser logs:
      TypeError: Failed to fetch dynamically imported module: http://localhost:8000/test/specs/autocomplete.spec.ts?wtr-session-id=-NU7GvtfIlk4fdKWEvWWZ

 ❌ Could not import your test module. Check the browser logs or open the browser in debug mode for more information. 

This makes finding root cause of the problem really hard. In my case it was: #2041, but I only found about it after installing esbuild directly in my project to test if the transpilation process works fine.

mkczarkowski avatar Sep 13 '22 09:09 mkczarkowski