Button compile failure on Web with react-native-web
See original GitHub issueExplain what you did While following https://react-native-training.github.io/react-native-elements/blog/2018/12/13/react-native-web.html, `import { Button } from ‘react-native-elements’ triggers screenshot below.
Native (Android) would render Button fine.
Expected behaviour Button renders on Web, as it does on native platforms.
Describe the bug

To Reproduce Follow https://react-native-training.github.io/react-native-elements/blog/2018/12/13/react-native-web.html
In src/App.js:
import { Button } from 'react-native-elements
Run yarn web
Your Environment (please complete the following information):
| software | version |
|---|---|
| react-native-elements | 1.1.0 |
| react-native | 0.55.4 |
| npm or yarn | yarn: 1.13.0 |
Related: #882
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:36 (17 by maintainers)
Top Results From Across the Web
compiler errors - React-Native-Web configuration issue
When I launch it in the browser after Expo start (Using this command - EXPO_WEB_DEBUG=true expo build:web ) it gives me an error...
Read more >The complete guide to React Native for Web - LogRocket Blog
Explore the massive potential and the current drawbacks of React Native for Web and explain how to set up a demo project.
Read more >How to add React Native Web to an existing ... - Aryan Goharzad
React Native for Web allows you to make your React Native application ... The first step is compiling any native library to the...
Read more >Introduction to React Native for Web
React Native for Web uses React DOM to accurately render React Native compatible JavaScript code in a web browser.
Read more >Testing - React Native
This guide introduces React Native developers to the key concepts ... to fix a bug in your code is to write a failing...
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 Free
Top 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

@fungilation Metro react-native bundler compile modules in
node_modules. And most libraries for react-native are published without compilation. But RNWeb applications compile with react-scripts like standard React application. So you must eject your application for includingnode_moduleslibraries into babel. See this discussion about babel config without ejecting.If you don’t want to eject you can replace react-scripts with react-app-rewired and change babel config using customize-cra. Ok, step-by-step:
npm install --save-dev react-app-rewired customize-cra @babel/plugin-proposal-class-propertiesChange scripts in your package.json:
config-overrides.jsin your project rootAnd woo a la - react-native-elements buttons works fine without ejecting!
P.S.
@babel/plugin-proposal-class-propertiesplugin resolve static class properties likepropTypesordefaultProps.P.P.S. Sorry for my english )))
@fungilation I’m going out this issue. I recommend you to read about webpack and babel.
From your repo, after install deps and
@babel/plugin-proposal-class-properties