Flow.js error - Cannot resolve module

March 16, 2020

I was confounded by this particular error today when trying to set up Flow in a new React project which had been bootstrapped from create-react-app.

It turns out that all it took in the [ignore] section of the .flowconfig file was removing the . from the front of .*/node_modules/.* . Final result: */node_modules/.*

This was confounding and I don’t think I would have figured it out without the help of a colleague. Thought I’d pay it forward here. Cheers!


I hope you found this article helpful! Hit me on Twitter @peterelbaum to share your thoughts and subscribe for more articles like this.