title: SyntaxError: Cannot use import statement outside a module firebase deploy error using typescript
body: <p>When I attempt to <code>firebase deploy</code> I get the following error.</p>
  <p>It seems to be about this line: <code>import * as functions from 'firebase-functions'; </code> at the begining of my file. I have not had any issues with this in the past. But I have recently <a href="https://github.com/FirebaseExtended/firestore-codelab-extended-swift/issues/45" rel="nofollow noreferrer">been having issues with NPM and deploying</a>.</p>
  <pre><code>Error: Error occurred while parsing your function triggers.
  
  /Users/name/Desktop/Yoveo/functions/src/index.ts:1
  import * as functions from 'firebase-functions';
  ^^^^^^
  
  SyntaxError: Cannot use import statement outside a module
      at wrapSafe (internal/modules/cjs/loader.js:1052:16)
      at Module._compile (internal/modules/cjs/loader.js:1100:27)
      at Module._compile (pkg/prelude/bootstrap.js:1281:32)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
      at Module.load (internal/modules/cjs/loader.js:984:32)
      at Function.Module._load (internal/modules/cjs/loader.js:877:14)
      at Module.require (internal/modules/cjs/loader.js:1024:19)
      at Module.require (pkg/prelude/bootstrap.js:1225:31)
      at require (internal/modules/cjs/helpers.js:72:18)
      at /Users/name/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/triggerParser.js:15:15
  
  Having trouble? Try firebase [command] --help
  name@name-MacBook-Pro functions % 
  </code></pre>
  <p><strong>How can I fix it?</strong></p>
  <p>I ran npm update and then ran firebase deploy again. got the same error. But with a recommendation to run npm install -g firebase-tools which after running deploy again, resulted in no change for the error.</p>