question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected token in src/index.ts on Expo 42

See original GitHub issue

Description

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:closed
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Mihai-githubcommented, Nov 6, 2021

Updating @babel/core and @babel/runtime fixed for me as mentioned in #1374.

Hi, I’ve found this 1h ago helping me with another problem and indeed it works just fine. 👍

3reactions
thahaaccommented, Nov 6, 2021

Updating @babel/core and @babel/runtime fixed for me as mentioned in #1374.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found