Error compiling react file with babel

Trying to compile a jsx to a js using babel and getting this error.

Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3".

This is strange because my packages are up-to-date.



1 Like

The fact that your package is up-to-date doesn’t mean that your environment is up-to-date.
Maybe you can delete the node modules and reinstall by npm install with the package that you have?

Did that 3 times, even deleted the whole project folder and started from scratch. Still got the same problem.