数据包超时异常

Paket TimeoutException

我有以下 paket.dependencies:

source https://www.nuget.org/api/v2

nuget Fable.Compiler 1.3.0-beta-002 beta
nuget FSharp.Core
nuget Fable.Core prerelease
nuget Fable.Import.Browser

clitool dotnet-fable 1.2.0-beta-005

group Build
framework: net46

    source https://nuget.org/api/v2
    nuget FSharp.Core  redirects:force, content:none
    nuget FAKE

尝试 运行 更新时出现以下错误:

[harm@localhost fable-powerpack]$ mono ./.paket/paket.exe update
Paket version 5.119.9-beta001
Resolving packages for group Build:
Performance:
 - Resolver: 3 minutes (1 runs)
    - Runtime: 116 milliseconds
    - Blocked (retrieving package versions): 3 minutes (1 times)
 - Average Request Time: 17 seconds
 - Number of Requests: 11
 - Runtime: 3 minutes, 1 second
Paket failed with
-> Unable to retrieve package versions for 'FAKE'
-> TimeoutException: Waited 180 seconds for a request to finish.
         Check the following sources, they might be rate limiting and stopped responding:
          - https://www.nuget.org/api/v2

在 paket.dependencies 中尝试 v3 给我:

[harm@localhost fable-powerpack]$ SET PAKET_RESOLVER_TASK_TIMEOUT=-1
bash: SET: command not found...
[harm@localhost fable-powerpack]$ mono ./.paket/paket.exe update
Paket version 5.119.9-beta001
Resolving packages for group Build:
Possible Performance degration, could not retrieve 'https://nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=Id eq 'FAKE'', ignoring further warnings for this source
Trial1 (NuGet.GetVersions) did not yield any results, trying again.
Trial1 (NuGet.GetVersions) did not yield any results, trying again.
Performance:
 - Resolver: 57 seconds (1 runs)
    - Runtime: 71 milliseconds
    - Blocked (retrieving package versions): 57 seconds (1 times)
 - Average Request Time: 7 seconds
 - Number of Requests: 12
 - Runtime: 58 seconds
Paket failed with
-> Unable to retrieve package versions for 'FAKE'
-> Could not find versions for package FAKE on https://nuget.org/api/v3.
-> Source 'https://nuget.org/api/v3' yielded no results
    -  Request 'https://nuget.org/api/v3/FindPackagesById()?semVerLevel=2.0.0&id='FAKE'' finished with error
    -> Could not retrieve data from 'https://nuget.org/api/v3/FindPackagesById()?semVerLevel=2.0.0&id='FAKE''
    -> RequestFailedException: Request to 'https://www.nuget.org/api/v3/FindPackagesById()?semVerLevel=2.0.0&id='FAKE'' failed with: 'NotFound'
    -  Request 'https://nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=Id eq 'FAKE'' finished with error
    -> Could not retrieve data from 'https://nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=tolower(Id) eq 'fake''
    -> RequestFailedException: Request to 'https://www.nuget.org/api/v3/Packages?semVerLevel=2.0.0&$filter=tolower(Id) eq 'fake'' failed with: 'NotFound'

这是否与 nuget.org 不可靠的正常运行时间有关,或者是否有可以在 paket 中更改的设置?

以下内容似乎有帮助:

export PAKET_RESOLVER_TASK_TIMEOUT=-1

与 npm/yarn 相比需要很长时间才能完成,但确实完成了。