title: SyntaxError: Unexpected token import - Express
body: <p>I have this in my index.js </p>
  
  <pre><code>import express from 'express'
  import data from './data/data'
  
  
  const app = express();
  const PORT = 3000; 
  
  app.listen(PORT, () =&gt;
      console.log(`Your server is running on ${PORT}`)
  );
  </code></pre>
  
  <p>This is my package.json </p>
  
  <pre><code>{
      "name": "express-app",
      "version": "1.0.0",
      "description": "backend provisioning",
      "main": "app.js",
      "scripts": {
          "start": "nodemon ./index.js --exec babel-node -e js"
      },
      "author": "B",
      "license": "ISC",
      "devDependencies": {
          "babel-cli": "^6.26.0",
          "babel-preset-env": "^1.6.1",
          "babel-preset-stage-0": "^6.24.1"
      },
      "dependencies": {
          "express": "^4.16.3"
      }
  }
  </code></pre>
  
  <p>When I run nodemon , I got </p>
  
  <pre><code>[nodemon] 1.17.3
  [nodemon] to restart at any time, enter `rs`
  [nodemon] watching: *.*
  [nodemon] starting `node index.js`
  /Users/b/Desktop/express-app/index.js:1
  (function (exports, require, module, __filename, __dirname) { import express from 'express'
                                                              ^^^^^^
  
  SyntaxError: Unexpected token import
      at createScript (vm.js:80:10)
      at Object.runInThisContext (vm.js:139:10)
      at Module._compile (module.js:607:28)
      at Object.Module._extensions..js (module.js:654:10)
      at Module.load (module.js:556:32)
      at tryModuleLoad (module.js:499:12)
      at Function.Module._load (module.js:491:3)
      at Function.Module.runMain (module.js:684:10)
      at startup (bootstrap_node.js:187:16)
      at bootstrap_node.js:608:3
  [nodemon] app crashed - waiting for file changes before starting...
  </code></pre>
  
  <p>Did I forget to do anything to be able to use the import command? </p>
  
  <p>I did this : </p>
  
  <pre><code>npm install --save-dev babel-cli babel-preset-env babel-preset-stage-0
  npm install express
  nodemon
  </code></pre>
  
  <p>same result </p>
  
  <p>I also try this </p>
  
  <pre><code>rm -rf node_modules/
  npm install
  nodemon
  </code></pre>
  
  <p>same result </p>
  
  <hr>
  
  <p><strong>.babelrc</strong></p>
  
  <pre><code>{
      "presets":[
          "env",
          "stage-0"
      ]
  }
  </code></pre>