pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

unexpected error invalid version: <!DOCTYPE html>

Open rdt712 opened this issue 1 year ago • 3 comments

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/[email protected]/src/utils/semver.ts:44:17
│     at Array.flatMap (<anonymous>)
│     at new SemVer (https://deno.land/x/[email protected]/src/utils/semver.ts:25:31)
│     at https://deno.land/x/[email protected]/src/hooks/useInventory.ts:24:63
│     at Array.compact (https://deno.land/x/[email protected]/src/utils/misc.ts:40:24)
│     at Object.get (https://deno.land/x/[email protected]/src/hooks/useInventory.ts:24:50)
│     at eventLoopTick (ext:core/01_core.js:183:11)
│     at async Object.select (https://deno.land/x/[email protected]/src/hooks/useInventory.ts:7:20)
│     at async Promise.all (index 5)
│     at async resolve (https://deno.land/x/[email protected]/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.

rdt712 avatar Nov 17 '23 16:11 rdt712

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.

jhheider avatar Nov 17 '23 18:11 jhheider

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

mxcl avatar Nov 18 '23 12:11 mxcl

Hey @rdt712, are you still experiencing this issue?

michaelessiet avatar Jan 02 '24 20:01 michaelessiet