Common Errors

In this section we explain a number of common error codes that users experience in the real world.



Cannot find name ga

You are probably using a third party library (e.g. google analytics) and don't have it declared. TypeScript tries to save you from spelling mistakes and using variables without declaring them so you need to be explicit on anything that is available at runtime because of you including some external library (more on how to fix it).



Cannot find module 'underscore'

You are probably using a third party library (e.g. underscore) as a module (more on modules) and don't have the ambient declaration file for it (more on ambient declarations).



Cannot compile modules unless the '--module' flag is provided

Checkout the section on modules.

For search indexing

You can ignore reading this. This section is for search engine indexing.

Other modules that people tend to use and get errors:

  • Cannot find name $
  • Cannot find module jquery

results matching ""

    No results matching ""