azure-devops - Microsoft Build Engine 升级后无法发布 Angular 应用程序
问题描述
上周某个时候,Microsoft DevOps 从以下位置升级了 Build Engine:
适用于 .NET Core 的 Microsoft (R) Build Engine 版本 16.2.32702+c4012a063
至
适用于 .NET Core 的 Microsoft (R) Build Engine 版本 16.3.0+0f4c62fea
似乎这已将 NODE 更新到版本 13,并导致 Npm 包(node-saas)安装停止工作......
> node-sass@4.9.3 install D:\a\1\s\Website\ClientApp\node_modules\@angular-devkit\build-angular\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node":
HTTP error 404 Not Found
升级前:
> node-sass@4.9.3 install D:\a\1\s\Website\ClientApp\node_modules\@angular-devkit\build-angular\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-64_binding.node
Download complete
URL 似乎从以下位置更改: https ://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-64_binding.node
至
https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node
有人可以帮忙解决这个问题吗?也许我可以在 Azure DevOps 中指定引擎版本...
解决方案
Use Node.js ecosystem
通过在任务之前在管道中添加任务,我们能够在构建系统中解决此问题npm install
。
- 检查您的开发机器中它工作的节点环境,记下。
- 将新任务添加到您的管道并搜索“Node.js 工具安装程序”。
- 指定要在此任务中使用的节点版本
- 保存管道
管道 yaml 如下所示:
steps:
- task: UseNode@1
displayName: 'Use Node 8.12.0'
inputs:
version: 8.12.0
我们也同时从使用切换更新:我们尝试仅使用npm install
到npm ci
,但我现在不相信它是相关的。npm ci
,但这并没有解决问题。
推荐阅读
- c# - ASP.NET MVC 5 仅保留一个唯一行
- image - 如何理解 .bitmap 格式编码。通过纸笔将 1 位位图转换为图像
- r - 使用 FFT 函数对 R 中的时间序列数据进行傅里叶平滑
- java - 在执行流式查询时修改 MySql 数据库
- ios - iOS FacebookSDK - App 新开发者提醒 - v2.6 升级提醒
- python - 加密 IV - C 和 Python 等效
- selenium - 无法使用具有相同类的量角器找到元素
- r - 如何遍历列表列表
- linux - bash 记录器中的自定义日志格式
- variables - ssh 到服务器并根据变量创建目录 - 全部在一行中