Unexpected token in src/index.ts on Expo 42
See original GitHub issueDescription
I am unable to run a managed expo project using Expo 42 (latest as of this writing) and gesture handler 1.10.2.
Running expo start produces this error:
SyntaxError: /Users/redacted/Projects/239-001/node_modules/react-native-gesture-handler/src/index.ts: Unexpected token (5:12)
3 | export { default as gestureHandlerRootHOC } from './gestureHandlerRootHOC';
4 | export { default as GestureHandlerRootView } from './GestureHandlerRootView';
> 5 | export type {
| ^
6 | // event types
7 | GestureEvent,
8 | HandlerStateChangeEvent,
Screenshots
Steps To Reproduce
Expected behavior
Actual behavior
Snack or minimal code example
Package versions
- React: 16.13.1
- React Native: (expo sdk 42)
- React Native Gesture Handler: 1.10.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Expo problem. Unexpected token '{'. Import call expects ...
It just seems a syntax error. · This is not a syntax error, I create a new project with the command: 'npx create-expo-app...
Read more >next js unexpected token export - You.com | The AI Search ...
So the dependency in node_modules folder exports a function using ES6 import/export module. The code will throw error when it running in browser...
Read more >Troubleshooting | React Navigation
Troubleshooting. This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Navigation.
Read more >Use TypeScript to Build a Node API with Express
The goal of this tutorial is to show you how to build a new ... For now, add the following comment to src/index.ts...
Read more >Reanimated - Expo Documentation
Reanimated uses React Native APIs that are incompatible with "Remote JS Debugging" for JavaScriptCore. In order to use a debugger with your app...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, I’ve found this 1h ago helping me with another problem and indeed it works just fine. 👍
Updating
@babel/core
and@babel/runtime
fixed for me as mentioned in #1374.