I was watching this video in order to learn how to add some simple tests to my Express routes but I am getting all kind of errors while executing a test. The error is:
I've recently hit this problem a few times in a project I'm working on.
The project contains many smaller modules which are all written in TypeScript and compiled before being committed. I have (clearly at least couple of times by the fact this link was already purple) somehow managed to commit my module without compiling. This resulted in the error when mocha tried to execute the .js version of a dependency which wasn't committed to version control.
Building the dependency, committing and updating the packages fixed my issue. Hopefully this helps someone else out in a similar position to me!