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 / No Stack Error Android Emulator

See original GitHub issue

Description

Hi all,

I have a frustrating issue that popped up recently and can’t seem to find a solution. If I run my expo app on my local Android Studio Emulator, I get the following error randomly (sometimes it works fine, then other times it gives this error). This has to be the emulator because when I run Expo Go on my physical device, it runs fine whilst giving the same error on the Emulator.

image

I tried this solution by updating my babel.config.js as so:

module.exports = function(api) { api.cache(true); return { presets: [[‘babel-preset-expo’, { unstable_disableES6Transforms: true }]], plugins: [ [“module:react-native-dotenv”] ] }; };

but this did not solve my issue. Any help would be appreciated.

Version

0.68.2

Output of npx react-native info

System: OS: Windows 10 10.0.19044 CPU: (8) x64 AMD FX™-8350 Eight-Core Processor Memory: 4.64 GB / 15.90 GB Binaries: Node: 16.16.0 - C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7784292 Visual Studio: Not Found Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

N/A

Snack, code example, screenshot, or link to a repository

N/A

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
pjsandwichcommented, Oct 14, 2022

It seems to have resolved after two system reboots, including wiping data of emulator

0reactions
cortinicocommented, Oct 17, 2022

It seems to have resolved after two system reboots, including wiping data of emulator

Closing due to this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected token no stack - android emulator expo
I get this weird message in android emulator whilst running expo, any idea whats causing this? There seems to be no real stack...
Read more >
React Native Unexpected token error while running in Emulator
Please click below link to help me ...
Read more >
Emulator release notes - Android Developers
Fixed issue where uppercase characters were delivered as lower case characters in the emulator. Fixed loading console token from a unicode path in...
Read more >
expo unexpected token '?' no stack - DEV Community ‍ ‍
The command to run is: expo r -c.
Read more >
Troubleshooting - React Native
If you run into issue where executing npm run android on macOS throws the above error, try to run sudo chmod +x android/gradlew...
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