title: Importing node.js module - SyntaxError: Unexpected identifier
body: <p>I'm trying to do the following import </p>
  
  <pre><code>import  ResClient from 'resclient';
  </code></pre>
  
  <h3>Result</h3>
  
  <pre><code>/home/arran/WebstormProjects/untitled1/app.js:2
  import  ResClient from 'resclient';
          ^^^^^^^^^
  
  SyntaxError: Unexpected identifier
      at new Script (vm.js:85:7)
      at createScript (vm.js:266:10)
      at Object.runInThisContext (vm.js:314:10)
      at Module._compile (internal/modules/cjs/loader.js:698:28)
      at Object.Module._extensions..js 
  (internal/modules/cjs/loader.js:749:10)
      at Module.load (internal/modules/cjs/loader.js:630:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
      at Function.Module._load (internal/modules/cjs/loader.js:562:3)
      at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
  </code></pre>
  
  <ul>
  <li>The module documentation is located <a href="https://www.npmjs.com/package/resclient" rel="noreferrer">here</a> and does the exact same import in the example. </li>
  <li><p>I have installed the module globally.</p>
  
  <pre><code>npm list -g | grep resclient
  └─┬ resclient@2.0.2
  </code></pre></li>
  <li><p>I am using the following node version </p>
  
  <pre><code> $node -v
   v11.10.1
  </code></pre></li>
  </ul>
  
  <p>I have seen some other posts about this error. For example <a href="https://stackoverflow.com/questions/47632562/es6-module-import-giving-uncaught-syntaxerror-unexpected-identifier">here</a> but it is a browser based problem using client side javascript rather than node. 
  I'm a node newbie, so would appreciate any pointers no matter how basic. </p>