Gleam tests fail to run locally. Get "unmatched value: Error(NotUtf8)" error

I’m unable to run the tests for the Gleam exercises locally. I always get this error:

   Compiled in 0.05s
    Running lasagna_test.main
runtime error: let assert

Pattern match failed, no pattern matched the value.

unmatched value:
  Error(NotUtf8)

stacktrace:
  exercism/test_runner.read_module src/exercism/test_runner.gleam:74
  gleam/list.map_loop src/gleam/list.gleam:392
  exercism/test_runner.main src/exercism/test_runner.gleam:36

For every exercise I have to submit it to see which tests fail and why.

Am I doing something wrong?

How are you running them? Did you follow these install and test instructions? DId you use the exercise CLI to get the test files?

Yes. I installed Gleam via homebrew as per the website instructions and I use the CLI to get the exercises.

And to clarify, this only happens once I’ve added source code. I can see failing tests immediately after downloading the exercise and running gleam test from the exercise root directory.