Search code examples
typescriptazurevisual-studio-2017

Visual studio 2017 task failing in azure pipeline due to older Typescript SDK


The Visual studio 2017 build throws up an error when building

src\Service\node_modules\utility-types\dist\aliases-and-guards.d.ts(10,51): Error TS2304: Build:Cannot find name 'bigint

This is only observed on pipeline and locally it works fine.

I did my home work and upgraded my typescript from 3.1 to 3.7 however VS task still fails to understand and throws an error at the time of build.

This is run in an azure pipeline and hence the task and with it the entire pipeline fails.

tsconfig

{ "compilerOptions": { "moduleResolution": "node", // csstype included by React "target": "es2016", // <Counter /> "jsx": "react", "sourceMap": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "types": ["chrome", "react", "jest", "node"], "outDir": "./ClientApp/Scripts/js/" }, "exclude": ["/node_modules"] }


Solution

  • this can be resolved by including in your .csproj file <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>