title: How can i correctly use GoogleApis (Youtube API in particular) in an angular App?
body: <p>The Youtube API documentation does not have any information about using it with Angular and TypeScript. And the JS or NodeJS version of their code doesn't seem to work for me, so my question is:</p>
  
  <ol>
  <li><p>What package do I need to install?
  tried: </p>
  
  <p>npm install --save googleapis</p></li>
  <li><p>How do i import it? 
  tried: </p>
  
  <p>import {google} from 'googleapis'</p></li>
  <li><p>How to load the Youtube API
  tried: </p>
  
  <p>const service = google.youtube('v3');</p></li>
  </ol>
  
  <p>The line const service = google.youtube('v3'); ends up breaking the app. The app gets a compilation error even though there is no error in the code(no error shown in IDE). This code i tried was taken from their NodeJS quickstart guide with slight modifications to suit TS syntax(like the import).
  The error:</p>
  
  <blockquote>
    <p>ERROR in ./node_modules/gtoken/node_modules/mime/index.js<br>
    Module not found: Error: Can't resolve './types/other' in 'F:\live-sub-counter\node_modules\gtoken\node_modules\mime'<br>
    ERROR in ./node_modules/gtoken/node_modules/mime/index.js<br>
    Module not found: Error: Can't resolve './types/standard' in
    'F:\live-sub-counter\node_modules\gtoken\node_modules\mime'<br>
    ERROR in ./node_modules/google-auth-library/build/src/auth/googleauth.js<br>
    Module not found: Error: Can't resolve 'child_process' in 'F:\live-sub-counter\node_modules\google-auth-library\build\src\auth'<br>
    ERROR in ./node_modules/google-auth-library/build/src/pemverifier.js<br>
    Module not found: Error: Can't resolve 'crypto' in 'F:\live-sub-counter\node_modules\google-auth-library\build\src'<br>
    ERROR in ./node_modules/google-auth-library/build/src/auth/oauth2client.js<br>
    Module not found: Error: Can't resolve 'crypto' in 'F:\live-sub-counter\node_modules\google-auth-library\build\src\auth'<br>
    ERROR in ./node_modules/google-auth-library/build/src/auth/googleauth.js<br>
    Module not found: Error: Can't resolve 'crypto' in 'F:\live-sub-counter\node_modules\google-auth-library\build\src\auth'  </p>
  </blockquote>
  
  <p>and so on for a lot more modules</p>