I have a Typescript/React app, that can perform async function with a then/catch promise, but not with async/await/try/catch.
The error is: Uncaught ReferenceError: regeneratorRuntime is not defined .
The error seems to come from Babel. Here is my config:
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": ["babel-plugin-styled-components"]
}
How to fix this?