React is not defined when install one exported component on bit.dev - bit
Describe the bug
Can not use the exported component in another project due to above error on runtime.
Steps to Reproduce
- Follow Bit for React tutorial and export some component successfully at here
- Install component in another project with this syntax:
import ActionButtons from '@bit/vibe.react-admin-components.components';
- Run and see error in console
Expected Behavior
Exported component should be run without any error.
Screenshots, exceptions and logs
Error example when runtime
Specifications
- Bit version: 14.8.8
- Node version: 10.17.0
- npm version: 6.11.3
- Platform: Windows
- Bit compiler (include version):
- Bit tester (include version):
Additional context
I have asked on stackoverflow: https://stackoverflow.com/questions/65720246/react-is-not-defined-when-install-one-exported-component-on-bit-dev
Any help will be appreciated! Thanks.
Asked Oct 02 '21 18:10
shinaBR2
1 Answer:
Hi @shinaBR2 thanks for opening the issue. I responded to you in Stackoverflow. The error was because the compiler not supported React 17, I published a new version of it and now it supports React 17. please use the new version and re-export your component. https://bit.dev/bit/envs/compilers/react?version=1.0.23
1
Answered Feb 01 '21 at 21:31
JoshK2
Read next
- SPU fail over result in over-duplicate of records - Rust fluvio
- pass options to enable container without having to go through cli prompt - takeout
- Magic Keyboard 2 brightness keys (F1/F2) no longer control external monitors, only MacBook pro display - Swift MonitorControl
- Signal-Android Verifier rejected class org.thoughtcrime.securesms.conversation.ConversationFragment$ConversationSnapToTopDataObserver - Java
- (node:11476) UnhandledPromiseRejectionWarning: TimeoutError: Timed out after 30000 ms while trying to connect to Chrome! The only Chrome revision guaranteed to work is r609904 - TypeScript puppeteer
- Changelog and releases - C fwupd
- Element hangs on launch on Fedora 33 - TypeScript element-web
- Jetpack search page from WP.com indicates a WP.com site, even when self-hosted - wp-calypso