Unexpected token when bundling
richardkavanagh77 opened this issue · 1 comments
richardkavanagh77 commented
After installing, when I run react-native run-android
I get the following error:
error: bundling failed: SyntaxError: /Users/nickwoods/Documents/GitHub/client-app/node_modules/react-native-toast-notifications/src/index.ts: Unexpected token (4:12)
2 | export { default as ToastProvider } from "./hook/provider";
3 | export { default as useToast } from "./hook/useToast";
> 4 | export type {ToastType} from './hook/context'
| ^
richardkavanagh77 commented
Fixed by upgrading @babel/core
and @babel/runtime
as per https://stackoverflow.com/questions/61166181/how-to-solve-syntax-error-unexpected-token-export-type