lts no longer works as a version
goodevilgenius opened this issue · 4 comments
If I try nave use lts <command>
, instead of running the command in the lts
version, it prints out:
What version of node?
lts, lts/, latest, x.y, or x.y.z >
I then type lts
, and it prints:
Invalid version specifier
failed to create lts env
nave install lts
results in:
Must supply a version ('lts', 'stable', 'latest' or numeric)
nave install stable
has similar results, however nave install latest
works.
I'm using the current version of nave on main
, although I first noticed the issue on a much older version.
Ah, this isn't a change to nave, but node's dist folder no longer contains a lts
directory. https://nodejs.org/dist/lts
So that's why.
Probably about time to read these things from the tab or json file, instead of parsing the html index.
EDIT: this is incorrect, that's not how it works.
@isaacs AFAIK Node.js never implement a link for https://nodejs.org/dist/lts -- I remember you asked for something akin to it once in nodejs/node#11173.
I checked with http://web.archive.org/ and it has no cached versions of https://nodejs.org/dist/lts (but does for e.g. https://nodejs.org/dist/ where you can see no lts
subdirectory in the cached results).
I was mistaken! lol
This seems to be working actually?
$ nave use lts node -v
v20.9.0
@goodevilgenius It could be that the cache is incorrect. It only fetches the version listing once per day at most, so it could be that it happened to fetch while the links were moving around? See if this fixes things:
nave cache ls | grep index.html | xargs rm
nave use lts
@isaacs Yeah, I checked again, and it was only happening on one computer. Others were fine.
nave cache ls | grep index.html | xargs rm
didn't fix it, though. However, rm -rf ~/.nave/cache/*
did fix it.