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.

error: SyntaxError: .../node_modules/react-native/Libraries/Components/Touchable/Touchable.js: Unexpected token, expected "]" (25:45)

See original GitHub issue

New Version

0.70.0

Old Version

0.63.3

Build Target(s)

iOS 16.0

Output of react-native info

System: OS: macOS 13.0 CPU: (8) x64 Apple M1 Memory: 27.19 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm Watchman: 2021.06.07.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/alex/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: API Levels: 28, 29, 30, 31 Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 31.0.0 System Images: android-25 | Google APIs ARM 64 v8a, android-29 | Google Play ARM 64 v8a, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play ARM 64 v8a, android-31 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7486908 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: 11.0.10 - /opt/homebrew/opt/openjdk@11/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.1 => 0.70.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

  1. Build the app using Xcode 14
  2. yarn start --reset-cache
  3. Error displays

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:8
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
aprakimblecommented, Nov 30, 2022

It’s because babel core and runtime are out of date when you upgrade.

Even though the package.json specifies an earlier version when you start a new project from scratch it installs a newer version that works. I am sure all testing was done from scratch.

Force an update to:

@babel/core”: 7.20.5 “@babel/runtime”: 7.20.6

The versions I supplied came right from the lock files of a new install and resolve the issue.

1reaction
bulatshafigullincommented, Sep 27, 2022

Just upgraded from 0.63.4 to 0.70.1 and got this error This helped me rm -fr node_modules watchman watch-del-all

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >
SyntaxError Unexpected token, expected "," - Stack Overflow
I have that error: SyntaxError Unexpected token, expected ","). Code: render() { const {collections} = this.state; return ( <div ...
Read more >
Syntax Error: Unexpected token, expected "," (1:22) - MongoDB
Hi guys, I'm pretty new to MongoDB and just starting my journey learning different ways I can query my documents.
Read more >
unexpected token ')', expected 'expression' in iloiterator.h ...
0 libraries in Microsoft Visual Studio 2017 with the /permissive- command line option, you will get a syntax error: unexpected token ')', ...
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Unexpected token is similar to syntax error but more specific.Semicolon(;) in JavaScript plays a vital role while writing a programme. Usage: To ...
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