title: Importing moment in Angular 6
body: <p>I imported moment in angular 6:</p>
  
  <pre><code>import moment from 'moment'
  </code></pre>
  
  <p>and </p>
  
  <pre><code>let formatted = moment(startDate).tz(timezone).format();
  </code></pre>
  
  <p>which seems to work fine...but <strong>ng serve</strong> outputs the following error:</p>
  
  <pre><code>Module '"/my/project/node_modules/moment/moment"' has no default export.
  </code></pre>
  
  <p>OK, I understand this error; it says that moment is not exported as default...but when I try to export this way:</p>
  
  <pre><code>import { moment } from 'moment'
  </code></pre>
  
  <p>but than, error says that moment is in fact an object, not a function.</p>
  
  <p>How did it work in the first step than?
  How should I import the "moment"?</p>
  
  <p><strong>UPDATE</strong>
  I also tried as suggested in the other question...</p>
  
  <pre><code>import * as moment from 'moment';
  </code></pre>
  
  <p>But than I got the following result:</p>
  
  <pre><code>ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.
  node_modules/angular-moment-timezone/node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode'.
  </code></pre>