title: VS Code "Cannot find module" error on Firebase Functions Project
body: <p>I set up a firebase functions project on visual studio code and inside the index.ts file I was unable to make it recognize the imported modules. The autocomplete shows that the modules exist, however when I import them I get the error &quot;Cannot find module&quot;.</p>
  <p>But the project compiles and passes the lint check. I just cannot use the intellisense. I tested the solutions below but cannot get it working;</p>
  <ul>
  <li>Remove node-modules folder then execute <code>npm install</code>.</li>
  <li>Create new firebase functions project on a new directory.</li>
  <li>Uninstall and reinstall vs-code. (Removing every property inside AppData).</li>
  <li>Reinstall the typescript globally.</li>
  <li>Remove extensions.</li>
  <li>Test on MacOS instead of Windows 10</li>
  </ul>
  <p><strong>Screenshots</strong></p>
  <ul>
  <li><p>The error</p>
  <p><a href="https://i.stack.imgur.com/ybmbd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ybmbd.png" alt="enter image description here" /></a></p>
  </li>
  <li><p>Folder structure</p>
  <p><a href="https://i.stack.imgur.com/SyUGK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SyUGK.png" alt="enter image description here" /></a></p>
  </li>
  <li><p>tsconfig.json</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;compilerOptions&quot;: {
       &quot;module&quot;: &quot;commonjs&quot;,
       &quot;noImplicitReturns&quot;: true,
       &quot;noUnusedLocals&quot;: true,
       &quot;outDir&quot;: &quot;lib&quot;,
       &quot;sourceMap&quot;: true,
       &quot;strict&quot;: true,
       &quot;target&quot;: &quot;es2017&quot;,
       &quot;typeRoots&quot;: [&quot;node_modules/@types&quot;] 
    },
    &quot;compileOnSave&quot;: true,
    &quot;include&quot;: [&quot;src&quot;, &quot;decs.d.ts&quot;]
  }
  
  </code></pre>
  </li>
  <li><p>package.json</p>
  </li>
  </ul>
  <pre><code>{
    &quot;name&quot;: &quot;functions&quot;,
    &quot;scripts&quot;: {
      &quot;lint&quot;: &quot;tslint --project tsconfig.json&quot;,
      &quot;build&quot;: &quot;tsc&quot;,
      &quot;serve&quot;: &quot;npm run build &amp;&amp; firebase emulators:start --only functions&quot;,
      &quot;shell&quot;: &quot;npm run build &amp;&amp; firebase functions:shell&quot;,
      &quot;start&quot;: &quot;npm run shell&quot;,
      &quot;deploy&quot;: &quot;firebase deploy --only functions&quot;,
      &quot;logs&quot;: &quot;firebase functions:log&quot;
    },
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;8&quot;
    },
    &quot;main&quot;: &quot;lib/index.js&quot;,
    &quot;dependencies&quot;: {
      &quot;@google-cloud/firestore&quot;: &quot;^4.2.0&quot;,
      &quot;@google-cloud/storage&quot;: &quot;^5.2.0&quot;,
      &quot;@types/multer&quot;: &quot;^1.4.4&quot;,
      &quot;cors&quot;: &quot;^2.8.5&quot;,
      &quot;express&quot;: &quot;^4.17.1&quot;,
      &quot;express-multipart-file-parser&quot;: &quot;^0.1.2&quot;,
      &quot;firebase-admin&quot;: &quot;^9.2.0&quot;,
      &quot;firebase-functions&quot;: &quot;^3.11.0&quot;,
      &quot;multer&quot;: &quot;^1.4.2&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@types/cors&quot;: &quot;^2.8.7&quot;,
      &quot;firebase-functions-test&quot;: &quot;^0.2.0&quot;,
      &quot;tslint&quot;: &quot;^5.12.0&quot;,
      &quot;typescript&quot;: &quot;^3.8.0&quot;
    },
    &quot;private&quot;: true
  }
  </code></pre>