title: SyntaxError: Unexpected token import
body: <p>When I am running index.js its giving error <code>SyntaxError: Unexpected token import</code>. Though I am using babel to convert ES6 to ES5.</p>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "espract",
    "version": "1.0.0",
    "description": "",
    "main": "app.js",
    "scripts": {
      "build": "babel src -d lib"
    },
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "babel-cli": "^6.3.17"
    }
  }
  </code></pre>
  
  <p>Person.js</p>
  
  <pre><code>'use strict';
  
  module.exports = class Person {
      constructor(firstname, lastname) {
          this.firstName = firstname;
          this.lastName = lastname;
      }
  
      greet() {
          console.log(`Hello, ${ this.firstName } ${ this.lastName }`);
      }
  };
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>import * as Person from './lib/Person';
  
  
  //es class inherit Person
  class Policeman extends Person {
  
      constructor(firstname, lastname, badgenumber) {
          //call parent constructor
          super(firstname, lastname, badgenumber);
          this.badgeNumber = badgenumber;
      }
  
      greet(){
          //call parent class method
          super.greet();
          console.log(`License: ${this.badgeNumber}`);
      }
  
  }
  
  var officer = new Policeman("John", "Solan", "1231341314134");
  officer.greet();
  </code></pre>
  
  <blockquote>
    <p>Note: When I am using <code>var Person = require('./lib/Person')</code> its
    working absolutely fine.</p>
  </blockquote>
  
  <p>Please guide me I just started learning nodejs.</p>