title: Cannot find module 'path' in program.d.ts
body: <p>When running ng serve my code fails to compile and gives me this error:</p>
  
  <blockquote>
    <p>ERROR in node_modules/@angular/compiler-cli/src/transformers/program.d.ts(9,23): error TS2307: Cannot find module 'path'.</p>
  </blockquote>
  
  <p>I thought that it had something to do with that my local angular version is an older version than my global version, so I tried <a href="https://stackoverflow.com/a/43931987/9758696">this solution</a></p>
  
  <p>But this didn't help. Now for my code to compile I have to delete a ';' somewhere random in my project, save the project, add the semicolon back and save the project. With this method, my code compiles and my app works but the error is still there.</p>