I am working with create-react-app + typescript + eslint application and during build have such error:
Line 1:8: \'React\' was used before it was defined @t
(not enough rep to comment)
@sashko's workaround seems to work - deleting node_modules was necessary as well.
One thing I missed was the caret in "^4.0.1". The version needs to be fixed without the caret ^, which seems to be the issue that @Rolly is having. Make sure it's 4.0.1.
Only a workaround until react-scripts updates to v4 (I'm using create-react-app)