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.

Invariant Violation: Element type is invalid: expected a string

See original GitHub issue

Hi mate, I don’t understand this issue (Works if I remove the TranslateY component), I’m using the last version of react-native 0.57.8

import { TranslateY } from 'react-native-motion'

issue-invariant-type

Log:

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.  Check the render method of `BarChart`.  This error is located at:     in RCTView (at View.js:45)     in View (at BarChart/index.js:21)     in BarChart (at Motion/index.js:45)     in RCTView (at View.js:45)     in View (at Motion/index.js:75)     in RCTScrollContentView (at ScrollView.js:852)     in RCTScrollView (at ScrollView.js:977)     in ScrollView (at KeyboardAwareHOC.js:508)     in KeyboardAwareScrollView (at Content.js:95)     in Content (at connectStyle.js:384)     in Styled(Content) (at Motion/index.js:74)     in RCTView (at View.js:45)     in View (at Container.js:15)     in Container (at connectStyle.js:384)     in Styled(Container) (at Motion/index.js:62)     in MotionScreen (created by SceneView)     in SceneView (at StackViewLayout.js:793)     in RCTView (at View.js:45)     in View (at createAnimatedComponent.js:153)     in AnimatedComponent (at StackViewCard.js:69)     in RCTView (at View.js:45)     in View (at createAnimatedComponent.js:153)     in AnimatedComponent (at screens.native.js:59)     in Screen (at StackViewCard.js:57)     in Card (at createPointerEventsContainer.js:27)     in Container (at StackViewLayout.js:858)     in RCTView (at View.js:45)     in View (at screens.native.js:83)     in ScreenContainer (at StackViewLayout.js:311)     in RCTView (at View.js:45)     in View (at createAnimatedComponent.js:153)     in AnimatedComponent (at StackViewLayout.js:307)     in Handler (at StackViewLayout.js:300)     in StackViewLayout (at withOrientation.js:30)     in withOrientation (at StackView.js:79)     in RCTView (at View.js:45)     in View (at Transitioner.js:215)     in Transitioner (at StackView.js:22)     in StackView (created by Navigator)     in Navigator (at createKeyboardAwareNavigator.js:12)     in KeyboardAwareNavigator (at createAppContainer.js:388)     in NavigationContainer (at App.js:25)     in RCTView (at View.js:45)     in View (at Root.js:13)     in Root (at connectStyle.js:384)     in Styled(Root) (at App.js:24)     in App (at renderApplication.js:34)     in RCTView (at View.js:45)     in View (at AppContainer.js:98)     in RCTView (at View.js:45)     in View (at AppContainer.js:115)     in AppContainer (at renderApplication.js:33)  createFiberFromTypeAndProps     index.bundle?platform=ios&dev=true&minify=false:12359:26 createFiberFromElement     index.bundle?platform=ios&dev=true&minify=false:12379:48 createChild     index.bundle?platform=ios&dev=true&minify=false:15172:56 reconcileChildrenArray     index.bundle?platform=ios&dev=true&minify=false:15401:42 reconcileChildren     index.bundle?platform=ios&dev=true&minify=false:16039:50 updateHostComponent     index.bundle?platform=ios&dev=true&minify=false:16388:26 performUnitOfWork     index.bundle?platform=ios&dev=true&minify=false:19570:27 workLoop     index.bundle?platform=ios&dev=true&minify=false:19604:47 renderRoot     index.bundle?platform=ios&dev=true&minify=false:19675:21 performWorkOnRoot     index.bundle?platform=ios&dev=true&minify=false:20393:23 performWork     index.bundle?platform=ios&dev=true&minify=false:20320:30 performSyncWork     index.bundle?platform=ios&dev=true&minify=false:20296:20 batchedUpdates$1     index.bundle?platform=ios&dev=true&minify=false:20479:28 batchedUpdates     index.bundle?platform=ios&dev=true&minify=false:10149:37 _receiveRootNodeIDEvent     index.bundle?platform=ios&dev=true&minify=false:10206:23 receiveTouches     index.bundle?platform=ios&dev=true&minify=false:10236:34 __callFunction     index.bundle?platform=ios&dev=true&minify=false:2470:49 <unknown>     index.bundle?platform=ios&dev=true&minify=false:2243:31 __guard     index.bundle?platform=ios&dev=true&minify=false:2424:15 callFunctionReturnFlushedQueue     index.bundle?platform=ios&dev=true&minify=false:2242:21

Thanks in advance, Juan

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
xotahalcommented, Jan 31, 2019

Hey! The new version was published - sorry man. I wish I have more time for open source projects …

1reaction
xotahalcommented, Jan 31, 2019

That’s a good job, man 😉 Thanks …

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant Violation: Element type is invalid: expected a string ...
This error can rise if you try to import a non-existent component. Make sure you have no typo and that the component indeed...
Read more >
(React) Element type is invalid, expected a string (for built in ...
To solve the error "Element type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got",...
Read more >
Invariant Violation: Element type is invalid: expected ... - GitHub
Invariant Violation : Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Read more >
Invariant Violation: Element type is invalid ... - YouTrack
Invariant Violation : Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
Read more >
Element type is invalid: expected a string (for built-in ... - Reddit
Getting Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ...
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