Visual Studio 2017 任务在 Azure 管道中失败,原因是较旧的 Typescript SDK



>Visual Studio 2017 构建在构建时引发错误

srcServicenode_modulesutility-typesdistaliases-and-guards.d.ts(10,51): Error TS2304: Build:Cannot find name 'bigint

这仅在管道上观察到,并且在本地工作正常。

我做了功课并将打字稿从 3.1 升级到 3.7,但是 VS 任务仍然无法理解并在构建时抛出错误。

这是在 Azure 管道中运行的,因此任务和整个管道都会失败。

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"] }

这可以通过包含在.csproj文件中来解决<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>

最新更新