React.js file. Socket.io file inclusion
<p>In my react.js project I needed to include socket.io support. For that I have used a this <a href="https://github.com/DanialK/ReactJS-Realtime-Chat" rel="nofollow noreferrer">repository</a> as a reference.</p>

<p>That worked, but on other machines when the code is pulled is giving the error that the socket.io is undefined in the browser.</p>

<p>This is the main index.html that has the socket inclusion:</p>

<pre><code>&lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
&lt;script src="/socket.io/socket.io.js"&gt;&lt;/script&gt;
&lt;script src="/js/app.built.js"&gt;&lt;/script&gt;
&lt;/body&gt;
</code></pre>

<p>This is how it is used in the React component:</p>

<pre><code>var Select = require('react-select');
var socket = io.connect();

const PartsCleanUp = React.createClass({

  propTypes: {
  location: React.PropTypes.object,
  routeParams: React.PropTypes.any,
  children: React.PropTypes.object
},
</code></pre>

<p>What I dont understand is, inside the index.html file... how is socket io being fetched? I assume it is being injected with webpack or somehow.</p>

<p>I am thinking that I need a standalone socket.io to be included in the index.html, but I am not certain.</p>

<p>Picture shows inclusion in the index.html and that the socket is installed as node_module.<a href="https://i.stack.imgur.com/nykJe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nykJe.jpg" alt="enter image description here"></a></p>