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.

Want to try use react-native-web

I have some error like the following

ERROR in ./node_modules/react-native-material-ui/src/Dialog/DialogDefaultActions.react.js
Module parse failed: node_modules\react-native-material-ui\src\Dialog\DialogDefaultActions.react.js Unexpected token (48:12)
You may need an appropriate loader to handle this file type.
| 
|         return (
|             <View style={styles.defaultActionsContainer}>
|                 {actions.map(action =>
|                     <Button
 @ ./node_modules/react-native-material-ui/src/index.js 15:0-86
 @ ./node_modules/react-native-material-ui/index.js
 @ ./src/containers/App.js
 @ ./src/containers/Root.js
 @ ./index.web.js

Currently I use babel-loader and react-native as presets

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
dalcibcommented, Aug 6, 2017

You need to add this path /node_modules[\\\/]react-native-*/ to your include field in the babel-loader config in webpack.

Take a look in this example https://github.com/dalcib/react-native-material-ui-web-app that use react-app-rewired to configure create-react-app to do that.

1reaction
dalcibcommented, Aug 7, 2017

Try npm i babel-plugin-transform-react-remove-prop-types

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · webpack/webpack - GitHub
A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application...
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
Webpack 5 Issues | Documentation - Web3Auth
While setting up a new web3 project from scratch, you might face multiple issues with webpack 5. This issue is caused due to...
Read more >
node.js - Webpack issue when update 4.x to 5.x - Stack Overflow
It might not be the right example to your situation, but they made some internal changes to the webpack structure:
Read more >
The Problem with Webpack and Why It Is (Kind of) Our Fault
TLDR: Libraries should let innovation come either from within the core or from plugins/middleware out in the wild. Trying both approaches in ...
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