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.

Unhandled JS Exception: Unexpected identifier 'invariant'. import call expects exactly one argument. no stack

See original GitHub issue

Description

So Xcode got updated to the 13.2.1 version and since that update I am no being able to run the app. It builds successfully but doesn’t run, this error shows up:

Screen Shot 2022-01-14 at 1 17 54 PM

I tried recloning the app but it doesn’t work, also I build and run another react native app and it works normally and also download the simulators for iOS 15 because the update brings the 15.2 which is the latest iOS version.

Please help.

Version

0.64.2

Output of npx react-native info

System:
    OS: macOS 12.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 190.46 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.18.1 - ~/.nvm/versions/node/v12.18.1/bin/node
    Yarn: 1.22.4 - ~/.nvm/versions/node/v12.18.1/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v12.18.1/bin/npm
    Watchman: 2021.11.15.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      API Levels: 23, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 32.0.0
      System Images: android-28 | Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7935034
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.8 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.2 => 0.64.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

yarn install cd ios pod install cd … react-native run-ios

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

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:9
  • Comments:20

github_iconTop GitHub Comments

11reactions
misterbo271commented, Jan 18, 2022

I have a similar issue: Unhandled JS Exception: Unexpected identifier ‘_classCallCheck’. import call expects exactly one argument. no stack Please helps me Simulator Screen Shot - iPhone 13 - 2022-01-18 at 13 12 40

6reactions
marciodajrcommented, Jan 29, 2022

Hey guys! 😎

When we copy or clone a project. The package.json file always comes with a caret “^” in front of the versions of some packages. That is, when we run the installation (npm/yarn) the packages will be updated. 😱

It worked for me! 👌

Recommend using this site 😏 React Native Upgrade Helper by selecting your React Native version and adjusting the version number in package.json file. Then remove the node_modules folder and the file ( package-lock.json or yarn.lock) and run the install command and be happy! 🤩

🏆 Gold tip: To avoid errors like this in the future, remove the “^” cases from versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected identifier '_classCallCheck'. import call expects ...
I have a similar issue: Unhandled JS Exception: Unexpected identifier '_classCallCheck'. import call expects exactly one argument. no stack ...
Read more >
Unexpected identifier 'invariant'. import call expects exactly ...
Unhandled JS Exception : Unexpected identifier 'invariant'. import call expects exactly one argument. no stack.
Read more >
Unexpected identifier 'invariant'. import call expects exactly ...
Coding example for the question Unhandled JS Exception: Unexpected identifier 'invariant'. import call expects exactly one argument. no stack.
Read more >
How to fix the error "unexpected token "{". import call expects ...
Here is how to fix the error SyntaxError: Unexpected token '{'. import call expects exactly one argument.
Read more >
Unexpected identifier '_classCallCheck'. import call expects ...
Unhandled JS Exception : Unexpected identifier '_classCallCheck'. import call expects exactly one argument. no stack. 解决办法
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