I had a similar problem, removing node_modules and running npm install worked. Previously I had it installed with yarn which created the error (in my case was the error).
Hope this helps. Also as a reference, there is a similar issue in react community here