title: firebase function Error: Cannot find module when serving locally, out of the blue on previously working project
body: <p>I haven't touched any firebase related files and I can't seem to figure out why exactly this has just started occuring, but I keep getting:</p>
  
  <pre><code>We were unable to load your functions code. (see above)
     - It appears your code is written in Typescript, which must be compiled before emulation.
     - You may be able to run "npm run build" in your functions directory to resolve this.
  </code></pre>
  
  <p>my firebase config file:</p>
  
  <pre><code>{
      "functions": {
          "predeploy": "npm --prefix \"$RESOURCE_DIR\" run build",
          "source": "server"
      }
  }
  
  </code></pre>
  
  <p>and my folder structure:</p>
  
  <p><a href="https://i.stack.imgur.com/564N1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/564N1.png" alt="enter image description here"></a></p>
  
  <p>My tsconfig:</p>
  
  <pre><code>{
    "compilerOptions": {
      "module": "commonjs",
      "declaration": true,
      "removeComments": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "target": "es6",
      "sourceMap": true,
      "outDir": "./dist"
    },
    "exclude": ["node_modules", "test", "**/*spec.ts"],
    "include": ["src/**/*", "src"]
  }
  
  </code></pre>