title: "Require" exception in Cordova/phonegap project
body: <p>I am trying to build an hybrid mobile app using Phonegap/Cordova in Android platform. And I have succeeded in that too :) The app works as desired in Ripple emulator in my Chrome browser. I am not using Eclipe ADT or Android Studio as the emulator does not load quick.</p>
  
  <p>I have used onDeviceReady event and Navigator plugin for vibrate and alerts. All these works fine as expected.</p>
  
  <p>When the Developer Console is active in Chrome, the JavaScript breaks in cordova.js with the following error</p>
  
  <pre><code>Uncaught ReferenceError: require is not defined 
  </code></pre>
  
  <p>in the following line. The same happens for notification.js file too. When I press continue in debugger, everything works again as expected apart from that error.</p>
  
  <pre><code>var cordova_events = require('./src/events'),
  </code></pre>
  
  <p>Order of the java script files are as given below.</p>
  
  <pre><code>&lt;script src="js/cordova.js"&gt;&lt;/script&gt;
  &lt;script src="js/notification.js"&gt;&lt;/script&gt;               
  &lt;script src="js/vibration.js"&gt;&lt;/script&gt; 
  </code></pre>
  
  <p>I believe I am not referencing the correct cordova.js file and all other dependencies. But I also wonder how come does the app works fine in Ripple when the developer console is not active.</p>
  
  <p>I even tried to remove cordova.js file as Ripple automatically includes it as per <a href="https://stackoverflow.com/questions/5187089/phonegap-deviceready-event-ripple-emulator">phonegap deviceready event - ripple emulator</a></p>
  
  <p>I have the download copies of phonegap and cordova from their respective sites. I have installed Node.js and have installed the packages too.</p>
  
  <p><strong>My questions here are:</strong></p>
  
  <ul>
  <li>Where to find the correct cordova.js file? Which is the correct version to be included in my html files project?</li>
  <li>What's the user of Node.js over here?</li>
  <li>Does it designed to automatically include the scripts based on Node.js? If so what I am missing?</li>
  </ul>
  
  <p>I confess that the concept and usage of node.js looks like a rocket science for me. </p>