pkgxdev / pkgx

the last thing you’ll install

Home Page:https://pkgx.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unexpected error invalid version: <!DOCTYPE html>

rdt712 opened this issue · comments

commented

I am on a corporate proxy that requires system certificates. I managed to resolve the invalid peer certificate: UnknownIssuer error by setting the env var DENO_TLS_CA_STORE=system for Deno. However, whenever I try to run a package, I get the following error

unexpected error invalid version: <!DOCTYPE html>
│ Error: invalid version: <!DOCTYPE html>
│     at https://deno.land/x/libpkgx@v0.15.0/src/utils/semver.ts:44:17
│     at Array.flatMap (<anonymous>)
│     at new SemVer (https://deno.land/x/libpkgx@v0.15.0/src/utils/semver.ts:25:31)
│     at https://deno.land/x/libpkgx@v0.15.0/src/hooks/useInventory.ts:24:63
│     at Array.compact (https://deno.land/x/libpkgx@v0.15.0/src/utils/misc.ts:40:24)
│     at Object.get (https://deno.land/x/libpkgx@v0.15.0/src/hooks/useInventory.ts:24:50)
│     at eventLoopTick (ext:core/01_core.js:183:11)
│     at async Object.select (https://deno.land/x/libpkgx@v0.15.0/src/hooks/useInventory.ts:7:20)
│     at async Promise.all (index 5)
│     at async resolve (https://deno.land/x/libpkgx@v0.15.0/src/plumbing/resolve.ts:55:3)

I have been running sample commands found in the documentation such as:
pkgx postgres^12 --version
pkgx node@latest --version
pkgx openai --version

and they all produce the same error.

Any help would be appreciated! At the moment, I am unable to use pkgx at work, which is a real shame because it's such a cool concept.

Something is intervening in the call to https://dist.pkgx.dev/postgresql.org/darwin/aarch64/versions.txt (or similar, depending on your platform/arch). If curl https://dist.pkgx.dev/postgresql.org/darwin/aarch64/versions.txt works correctly, then it's Deno's fetch client that's suffering. I believe we thought at one point that .netrc support might help, but for an externally-managed software policy, even that might not be sufficient.

Is there some file we could parse that would make this just work for you @rdt712 ?

Hey @rdt712, are you still experiencing this issue?