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.

Latest React Native 0.62.0: Type Errror: Super expression must either be null or a function

See original GitHub issue

Issue Description

When upgrading to the latest version of RN 0.62.0 importing the package leads to Type Errror: Super expression must either be null or a function

Steps to Reproduce / Code Snippets

  1. Upgrade RN to 0.62.0.
  2. import { GiftedChat } from 'react-native-gifted-chat';
  3. Runtime error: Type Errror: Super expression must either be null or a function

Expected Results

Gifted Chat to load normally

Additional Information

Seems to spawn from GiftedChat.js line 3

  • Nodejs version: 12.16.1
  • React version: 16.11.0
  • React Native version: 0.62.0
  • react-native-gifted-chat version: 0.13.0
  • Platform(s) (iOS, Android, or both?): only tested on Android
  • TypeScript version: 3.8.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:21
  • Comments:34 (1 by maintainers)

github_iconTop GitHub Comments

64reactions
StagasaurusRexcommented, Mar 31, 2020

I hacked together a fork w/ the new action-sheet using the currently released version here. Use it with yarn add https://github.com/StagasaurusRex/react-native-gifted-chat.git#upgrade-action-sheet or w/e the equivalent npm command is.

13reactions
peteroidcommented, Apr 23, 2020

Based on https://github.com/StagasaurusRex/react-native-gifted-chat/commit/58ae0c8969d4e472538ed7abcecbb4ce81114f5f, I forced using the new version of action sheet lib which fixes the issue.

  1. Add this to the top level of the package.json
  "resolutions": {
    "@expo/react-native-action-sheet": "^3.6.0"
  }
  1. run yarn again

  2. The error should be gone ~

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-native: Super expression must either be null or a ...
In the latest version of react native, 'React' and 'Component' is moved from 'react-native' to 'react' module. So you will have to import...
Read more >
React-Native-Video: Super Expression Must Either Be Null ...
React Errors : Super expression must either be null or a function use and hence React finds that the Component you are trying...
Read more >
React Errors : Super expression must either be null or a ...
The first culprit is usually that you have forgotten to export the component that you are trying to use and hence React finds...
Read more >
React Errors : Super expression must either be null or a ...
Firstly, if you're certain that you're extending from the correctly named class, e.g. React.Component, not React.component or React.
Read more >
React Native, TypeError: Super expression must either be ...
I'm trying to run my react native app in my physical device but every time I get this error TypeError: Super expression must...
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