Microsoft 构建引擎升级后无法发布 Angular 应用程序

2024-01-08

上周的某个时候,Microsoft DevOps 将构建引擎升级为:

适用于 .NET Core 的 Microsoft (R) 构建引擎版本 16.2.32702+c4012a063

TO

适用于 .NET Core 的 Microsoft (R) 构建引擎版本 16.3.0+0f4c62fea

看来这已将 NODE 更新到版本 13,并导致 Npm 包(node-saas)安装停止工作......

> [email protected] /cdn-cgi/l/email-protection 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

升级前:

 > [email protected] /cdn-cgi/l/email-protection 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-64_binding.node

TO

https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_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 task.

  • 检查您的开发机器中运行的节点环境,并记下。
  • 将新任务添加到管道并搜索“Node.js 工具安装程序”。
  • 指定您要在此任务中使用的节点版本
  • 保存管道

管道 yaml 如下所示:

steps:
- task: UseNode@1
  displayName: 'Use Node 8.12.0'
  inputs:
    version: 8.12.0

We also switched from using npm install to npm ci at the same time, but I don't believe it to be related at this moment. Update: We tried using only npm ci and this did not solve the issue.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Microsoft 构建引擎升级后无法发布 Angular 应用程序 的相关文章

随机推荐