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.

Haul not working with Shoutem UI

See original GitHub issue

Current Behavior

I have been using Haul in a RN application without any problems. However, since I added Shoutem UI to my app, I’m getting several errors like the ones below:

(ios) ./node_modules/@shoutem/theme/src/StyleProvider.js
Module parse failed: Unexpected token (9:19)
You may need an appropriate loader to handle this file type.
|  */
| export default class StyleProvider extends React.Component {
|   static propTypes = {
|     children: PropTypes.element.isRequired,
|     style: PropTypes.object,
@ ./node_modules/@shoutem/theme/index.js 3:0-48
@ ./node_modules/@shoutem/ui/components/Lightbox.js
@ ./node_modules/@shoutem/ui/index.js
@ ./lib/AppNavigator.js
@ ./App.js
@ ./index.js
@ multi ./node_modules/haul/src/utils/polyfillEnvironment.js ./index.js

(android) ./node_modules/@shoutem/ui/components/Text.js
Module parse failed: Unexpected token (10:6)
You may need an appropriate loader to handle this file type.
|   render() {
|     return (
|       <RNText {...this.props} />
|     );
|   }
@ ./node_modules/@shoutem/ui/index.js 48:0-54:27
@ ./lib/AppNavigator.js
@ ./App.js
@ ./index.js
@ multi ./node_modules/haul/src/utils/polyfillEnvironment.js ./index.js

Expected Behavior

I expected to be able to use Haul with Shoutem as I’m with every other module I’ve added to the app. I understand this might be related with a loader that I should be using in Haul. Though, I’m not being able to figure it out. Do you have any recommendation?

Haul Configuration (webpack.haul.js)

I am using the default configuration.

module.exports = ({ platform }) => ({
  entry: `./index.js`,
});

By searching around in other issues, namely #220, I have also tried the following configuration.

module.exports = ({ platform }, {module}) => ({
  entry: `./index.js`,
  module: {
    ...module,
    rules: [
      {
        test: /\.js?$/,
        exclude: '/node_modules/',
        use: [
          {
            loader: 'babel-loader'
          }
        ]
      },
      ...module.rules
    ]
  }
});

Your Environment

software version
Haul 1.0.0-beta.11
react-native 0.50.3
node v8.9.1
yarn 1.3.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sky-franciscogoncalvescommented, Dec 15, 2017

@Krizzu Never mind, I have reset the cache and everything’s working now.

Really appreciated your help!

0reactions
zaguiinicommented, Jan 23, 2019

Hmm, I guess it’s not very clear that I’ve wiped the cache? It doesn’t show any logs on the screen even running with --verbose

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native with haul not working, throwing some loader issue
When i run react-native run-android i see the following error. Can someone help me please. ERROR Failed to compile. ./node_modules/native-base- ...
Read more >
Introduction - UI toolkit - Shoutem Developers
Shoutem UI toolkit enables you to build professionally looking React Native apps with ease. It consists of three libraries: @shoutem/ui: beautiful and ...
Read more >
23 posts tagged with "engineering" - React Native
React Native's limited Accessibility API has always been a huge pain point for developers, so we've made a few updates to the Accessibility...
Read more >
Untitled
Windows 8 vs windows 10, Dcr-hc32e driver, Update 9 lotro patch notes, India japanese ... Where is hafod haul filmed, Zebra stripe crochet...
Read more >
Untitled
Dell mediadirect button, Shct, City hopper flights klm, Faulheit islam, F6400 samsung 32 price, Guelord monami, Arma 3 jurassic park t rex, Julsajten, ......
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