Fixing VS2017 Typescript build error

Written by Mathew Grabau -

Fixing Visual Studio Typescript errors

After creating a new Typescriptr project in VS and trying to build it, the following error was constantly displayed:

"Build:Cannot find type definition file for 'angular'." (and then another few hundred of the same except with other packages).

After reading the documentation for Typescript, the following addition to tsconfig.json fixed the problem:

{
    "compilerOptions": {
// ... leaving out a bunch of the options here. The following options must be added.
        "typeRoots": [
                "./Scripts/typings/node",
                "./typings/globals"
            ]
    }
}

The paths specified under typeRoots are the ones applicable to the express project that I had generated.

For reference, the TypeScript version was configured as 2.3.