title: Unexpected identifier when importing express
body: <p>I am new to js and also node.js. I get unexpected identifier error when I try to start the server with the &quot;nodemon server.js&quot; command. express is installed.<br />
  Here is the server.js file:</p>
  <pre><code>import express  from   'express' ; 
  import mongoose from 'mongoose' ;
  
  
  const app = express();
  const port = proces.env.PORT || 8001 
  
  
  
  
  app.get('/', (req, res) =&gt; res.status(200).send(&quot;hello ozzy&quot;) ); 
  
  
  // Listener
  app.listen(port, () =&gt; console.log(`listening on localhost: ${port}`)); 
  </code></pre>
  <p>and here is my package.json file:</p>
  <pre><code>{
   &quot;name&quot;: &quot;bookvisor-backend&quot;,
   &quot;version&quot;: &quot;1.0.0&quot;,
   &quot;description&quot;: &quot;&quot;,
   &quot;main&quot;: &quot;server.js&quot;,
   &quot;type&quot;: &quot;module&quot;,
   &quot;scripts&quot;: {
    &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
    &quot;start&quot;: &quot;nodemon server.js&quot;
  },
  &quot;author&quot;: &quot;ozan&quot;,
  &quot;license&quot;: &quot;ISC&quot;,
  &quot;dependencies&quot;: {
    &quot;express&quot;: &quot;^4.17.1&quot;,
    &quot;mongoose&quot;: &quot;^5.11.18&quot;
  },
  &quot;devDependencies&quot;:{
    &quot;nodemon&quot;: &quot;^2.0.7&quot;
   }
  }
  </code></pre>
  <p>Here the error message</p>
  <pre><code>import express  from   'express' ; 
     ^^^^^^^
  
  SyntaxError: Unexpected identifier
  at Module._compile (internal/modules/cjs/loader.js:723:23)
  at Object.Module._extensions..js 
  (internal/modules/cjs/loader.js:789:10)
  at Module.load (internal/modules/cjs/loader.js:653:32)
  at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
  at Function.Module._load (internal/modules/cjs/loader.js:585:3)
  at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
  at startup (internal/bootstrap/node.js:283:19)
  at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
  [nodemon] app crashed - waiting for file changes before starting...
  </code></pre>
  <p>Why ?</p>