Invariant Violation: Element type is invalid: expected a string
See original GitHub issueHi 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'
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:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey! The new version was published - sorry man. I wish I have more time for open source projects …
That’s a good job, man 😉 Thanks …