asdf-nodejs
asdf-nodejs copied to clipboard
Installing lts versions is broken

commit aded55ba was the last one to allow installing lts versions.
commit 5d34772d and after show many hundred lines of output regarding unbound variable access before giving "node-build: definition not found: lts-gallium"
I first noticed the problem in a docker build based on ubuntu, and then reproduced it on osx / homebrew.
I need to go back to commit f9957f3f256ebbb3fdeebcaed5082ad305222be6 to make it work in the Ubuntu container build, whereas aded55ba works for the Mac.
This looks like a broken request in the past. Try clearing your cache by running rm -rf $ASDF_DIR/tmp/nodejs
I had this problem before but after removing the cache it solve itself. I think we added an incompatibility with previous cache files. If we are having the problem even after clearing the cache, I might give a deeper investigation
Cleaning the cache fixed the issue. Looks like I will need to automate cache removal.
From a user point of view, and especially if this is now a recurring issue, it would help if asdf-nodejs cleaned the cache automatically when needed.
This just happened to me as well, and clearing the cache also seemed to have fixed the issue and allowed me to install new nodejs versions fine.
I do get this error once after clearing the cache (not repeated like the one in the first post):
/Users/valentine/.asdf/plugins/nodejs/bin/../lib/utils.sh: line 82: printf: write error: Broken pipe
I just had this happen to me as well. Clearing the cache fixed it.
We changed the way aliases work on #348, now you need to explicitly opt-in with dynamic ranges on legacy version files (.tool-versions and .nvmrc). The .tool-versions file doesn't support non-deterministic versions, and supporting it on .tool-versions is not a feature we are seeking to implement at the moment.
To enable it, you need to provide an ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY environment variable choosing between the latest_available and latest_installed strategies, you can read more about it in the appropriate section on the README of the project. To make this choice permanent you can export said variable from your shell rc file like so:
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY=latest_installed
# OR
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY=latest_available
Please update the plugin by running asdf plugin-update nodejs. If a new issue arises with the new implementation please open a new issue.