我 Asp.Net Core 2.0与React解决方案并使用VSTS CI构建。在构建阶段,我收到一个错误 -
node_modules@typesreactindex.d.ts(109,81): Error TS2344:
Build:Type 'ChangeTargetHTMLAttributes<T>' does not satisfy the
constraint 'DOMAttributes<T>'.
我正在使用 React 15.0,我的tsconfig.json
内容是 -
{
"compilerOptions": {
"baseUrl": ".",
"module": "es2015",
"moduleResolution": "node",
"target": "es5",
"jsx": "react",
"sourceMap": true,
"skipDefaultLibCheck": true,
"strict": true,
"types": ["webpack-env"],
"noImplicitThis": false
},
"exclude": ["bin", "node_modules"]
}
我的 CI 管道是:
- 使用 NuGet 4.4.1
- NuGet 还原
- 点网还原
- 构建 Web 项目(此时我收到错误(
- 部署
当我
使用"Azure Web App"模板时,我遇到了上述错误。当我在 CI 构建阶段使用"ASP.NET Core"模板并为 CD 创建单独的版本时,我没有收到上述错误。
因此,基本上使用"ASP.NET Core"模板是正确的,因为我正在构建 ASP.NET Core解决方案。