To fix Babel 7 – ReferenceError: regeneratorRuntime is not defined with JavaScript, we install a few packages and then import them into our project.
We install the missing packages with
npm install --save core-js
npm install --save regenerator-runtime
And then import them with
import "core-js/stable";
import "regenerator-runtime/runtime";
to let us use Babel in our project.