title: React-Native-Web not compiling react native components from node module dependencies
body: <p>I am trying to convert my react-native app to react-native-web. I have followed <a href="https://medium.com/@jonnykalambay/your-first-hybrid-app-in-15-minutes-react-native-on-the-web-2cc2646051e" rel="nofollow noreferrer">this</a> reference. Following are the steps I followed:</p>
  
  <ol>
  <li>Created RN application and run it on iOS to check to confirm it is working on mobile.</li>
  <li>Executed following command:
  <code>npm install react-scripts react-dom react-native-web react-art react-router-native react-router-dom</code></li>
  <li>Created <code>index.html</code> file in public directory.</li>
  <li>Created <code>index.js</code> file in src directory with the following code:</li>
  </ol>
  
  <pre><code>import React from 'react';
  import ReactDom from 'react-dom';
  import App from './App';
  ReactDom.render(&lt;App /&gt;, document.getElementById("root"));
  </code></pre>
  
  <ol start="5">
  <li>Added following scripts in <code>package.json</code></li>
  </ol>
  
  <pre><code>"scripts": {
      "web": "react-scripts start",
      "build-web": "react-scripts build"
    },
  </code></pre>
  
  <ol start="6">
  <li>Executed application in web by running <code>npm run web</code> and my app was running in web browser.</li>
  </ol>
  
  <p>Everything worked only till I was not using any 3rd party module for my app. (Though styles weren't yet working :P)</p>
  
  <p>Now, I installed the <code>react-native-snap-carousel</code> library and I found that <code>react-native-web</code> is only working for the react-native components created in my project's <code>src</code> directory and not working for <code>nodeModules</code> code. Since simply render from <code>node module</code> with the following code fails:</p>
  
  <pre><code>render() {
    return &lt;View&gt;&lt;/View&gt;
  }
  </code></pre>
  
  <p>with following error:</p>
  
  <pre><code>
  ./node_modules/react-native-snap-carousel/src/carousel/Carousel.js
  SyntaxError: /Users/kapil.choubisa/Kapil_Data/JPPL/Code/POCs/IMMobileWeb/node_modules/react-native-snap-carousel/src/carousel/Carousel.js: Unexpected token (1223:12)
  
    1221 | 
    1222 |         return (
  &gt; 1223 |             &lt;View&gt;&lt;/View&gt;
  </code></pre>