title: Undefined is not an object(evaluating '_expo.default.Constants')
body: <p>I am getting an error at <code>Constants</code> in <code>const{manifest}=Expo.Constants</code> and showing me an error as undefined is not an object. I am not able to get it. Can anyone help me in removing that error.</p>
  
  <p>I am trying to make a connection between API running on my computer and when I am debugging on my phone. it should connect regardless of what the IP address is. </p>
  
  <pre class="lang-js prettyprint-override"><code>import moment from 'moment';
  import Expo from 'expo';
  
  const{ manifest} = Expo.Constants;
  const api = manifest.packagerOpts.dev
  ? manifest.debuggerHost.split(':').shift().concat(':3000')
  : 'productionurl.com'
  
  const url ='http://localhost:3000';
  
  export function getEvents(){
      return fetch(url)
      .then(response =&gt; response.json())
      .then(events =&gt; events.map( e =&gt;({...e})));
  }
  export function formatDateTime(dateString){
      const parsed = moment(new Date(dateString));
  
      if(!parsed.isValid()){
          return dateString;
      }
  
      return parsed.format('H A on DD MMM YYYY');
  }
  export function formatDate(dateString){
      const parsed = moment(new Date(dateString));
  
      if(!parsed.isValid()){
          return dateString;
      }
  
      return parsed.format('DD MMM YYYY');
  }
  
  export function getCountdownParts(eventDate){
      const duration = moment.duration(moment(new Date(eventDate)).diff(new Date()));
      return{
          days:parseInt(duration.as('days')),
      };
  }
  
  </code></pre>
  
  <blockquote>
    <p>Expected events to be displayed on my emulator from <code>db.json</code> file but
    I am getting error as Undefined.</p>
  </blockquote>