Azure DevOps + LibMan + UNPKG 间歇性错误 LIB010:无法从 unpkg.com 下载资源

Azure DevOps + LibMan + UNPKG Intermittent Error LIB010: Failed to download resource from unpkg.com

我已经在 Azure DevOps 上设置了持续集成,但我一直遇到间歇性问题,即 libman 无法下载资源,这里有几个例子:

##[error]libman.json(0,0): Error LIB010: Failed to download resource from "http://unpkg.com/devextreme@18.2.6/dist/css/icons/dxiconsmaterial.woff2"

##[error]libman.json(0,0): Error LIB010: Failed to download resource from "http://unpkg.com/globalize@1.4.2/dist/globalize-runtime/date.js"

##[error]libman.json(0,0): Error LIB010: Failed to download resource from "http://unpkg.com/cropperjs@2.0.0-alpha/src/js/preview.js"

导致错误的总是不同的包,所以我假设这是一个超时问题(太慢或者我滥用它 - 不确定)。

这是实际的异常消息:

exception was thrown --- [d:\a\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error :    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [d:\a\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error :    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [d:\a\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error :    at Microsoft.Web.LibraryManager.CacheService.<RefreshCacheAsync>d__9.MoveNext() [d:\a\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : --- End of stack trace from previous location where exception was thrown --- [d:\a\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error :    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [d:\a\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error :    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [d:\a\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error :    at Microsoft.Web.LibraryManager.Providers.Unpkg.UnpkgProvider.<RefreshCacheAsync>d__22.MoveNext() [d:\a\s\MyAppPortal\MyAppPortal.csproj]
[error]C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): Error : Microsoft.Web.LibraryManager.Contracts.ResourceDownloadException: Failed to download resource from "http://unpkg.com/knockout@3.4.0/package.json"
   at Microsoft.Web.LibraryManager.WebRequestHandler.<GetStreamAsync>d__5.MoveNext()

我该如何解决这个问题?有没有一种方法可以像 VS 在 运行 构建时一样在 DevOps 上缓存和重用下载的包?

LibraryManager package 有一个更新版本,它会重试下载几次。安装最新版本,看看是否有助于解决问题。